Learn to code JavaScript

Variables

Variables are used to store data. Once you "save" data using a variable you can access the value by using the name.

Examples:

• var string = "This is a string." (A String)

• var int = 15 (An Integer)

• var boolean = true (A Boolean)

Create a variable called name and set it equal to your name.