September 2024
Intermediate to advanced
743 pages
27h 48m
English
Now that you know the basic language constructs in JavaScript, let’s learn how to use each construct specifically in JavaScript next.
To cache data in a JavaScript program, you’ll need variables. In JavaScript, you can create variables using the let keyword.
You create variables in two steps: First, you must define the variable as such within a variable declaration. Then, you must assign a concrete value to the variable (called value assignment or variable initialization). To simplify things, the two can also be combined in a single line:
let firstName; // variable declarationfirstName = 'John'; // variable initializationlet lastName = 'Doe'; // combined variable ...
Read now
Unlock full access