JavaScript let
JavaScript let
Variables are containers that are used for storing information. The let statement is used for declaring a variable. Creating and declaring a variable are the same. After declaring a variable we have to assign a value to it. For this purpose, we have to use an equal sign to assign value. All of these steps are:-
- Let name;
- name = "Sita";
OR
- Let name = "Sita";
Syntax:-
Its syntax is:- let name = value;
Further Explanation:-
Parameter | Description |
name |
Required. The name of the variable and must follow rules. These rules are:-
|
value | Optional. A value to be assigned to the variable. |