SoFunction
Updated on 2025-04-13

JavaScript Elementary Tutorial (Lesson 2) Page 7/7


Now let’s review what I learned today.

Variable
The variable value can be a number or a string. There are some limitations and rules to remember when naming variables.
  
Statement
The statement ends in semicircle brackets.

String
Strings are sequences of practice in quote marks. Quotations are single quotes or double quotes. Many wonderful things can be done with strings. You can use "+" to concatenate two strings.

    () 
You can use () to write text and HTML in web pages.

    prompt 
You can use propt to get user input feedback.

    if--else 
You can use the if--else clause to make your JavaScript perform differently according to different user reactions.

Link Event
OnClick and onMouseOver in a href can run JavaScript based on user reactions.

Picture transformation
After the picture is named, you can use JavaScript to change the displayed picture.

If you feel that you have mastered everything we said above, then congratulations!
There are still many things to learn. Next time, we're going to get into the heart of JavaScript: Document Object Model, we'll also learn how to open and manipulate windows and frames, and start building our own new browser.
Previous page1234567Read the full text