O'Reilly logo

JavaScript™ 1.5 by Example by Kathie Kingsley-Hughes, Adrian Kingsley-Hughes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JavaScript Variables

Now that you are aware of JavaScript values, you are ready to enter the world of JavaScript variables.

Variables are important, not only in the context of JavaScript but in all computer programming languages. Without variables very little can happen. With variables, you unleash a tremendous amount of power and the capability to move, change, and work with all kinds of data.

Put in its simplest terms, a variable is a container, to which you assign a name, for a value (which always has a particular type) held in the memory of the computer running the JavaScript. This statement actually might make variables sound more complicated than they really are, because in the real world, they are very easy to use.

Creating Variables

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required