|
You are familiar with the alert function and that the stuff you want to show
up in the alert box must be in quotes of some type. Therefore, the first
thing that may jump out at you is that the variable is not in quotes
this is how the computer is able to recognize that the word description is a variable.
|
|
There is always a semicolon(;) after any statement in javascript...
Well, not always, but put them in always anyway. |
|
Below is a list of the most important uses for variables:
|
Use variables to hold input gotten from the user (this would be used in a form).
|
You can also use variables to count the number of times a certain process is ran.
|
Another valued use for variables is to store information about an object on your page (that'll make sense in chapter 5 -- DHTML).
|
|
In the fourth chapter you get to use conditional statements; this allows you to actually use your variables!
|
|