Beginner JavaScript – Chapter 6 – Variables

Note:

As stated in my initial post, this is part of a series of JavaScript-related posts. As I am becoming knowledgeable in JavaScript, I am posting out what I’ve learned, to re-enforce my knowledge, as well as maybe helpful other web designers/developers in learning JavaScript. If I have mis-stated anything, please feel free to post it in the comments. You’ll help me, and others in learning JavaScript. Thanks!

What are Variables?

The sole purpose of a variable is to store a value. The reason why it’s called a variable is the value can change at any time within the JavaScript application. Variables are used throughout programming with JavaScript, there’s just no escaping them.

Before you can use a variable, you must declare it. To declare a variable, you use the var (for variable) keyword, followed by the identifier (or variable name).

Read More