Creating & Naming Variables
Learn how to create and name variables in JavaScript. Learn what variable names are valid.
We'll cover the following...
Creating a Variable
We create a variable with the let
keyword. We write let
and then the variable name we want afterward. We give it the value we want using =
, just like a line from algebra.
Press + to interact
let number = 10;
The variable number
now has the value 10
.
Note that we add a semicolon at the end. This ...