Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

4.3.1. Declaring and Initializing Variables With let¶

/*To create a variable in JavaScript, create a new name for the variable 
and precede it with the keyword let:*/

let programmingLanguage;

/*Once a variable has been declared, it may be given a value using an 
assignment statement, which uses = to give a variable a value.*/

let programmingLanguage;
programmingLanguage = "JavaScript";

/*The act of assigning a variable a value for the first time is called 
initialization.*/
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged: #Declaring #Initializing #Variables #With
ADD COMMENT
Topic
Name
7+9 =