File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
22# JavaScript Variables
33
4- ## Activity 1
54
6- ### Task 1: Create a Variable using var Keyword and log it to the console
5+ ###1 : Create a Variable using var Keyword and log it to the console
76
87 ** Code:**
98 ``` jsx live
1514 - The console will display ` 10 ` .
1615 - The variable ` num ` is declared using ` var ` and assigned the value ` 10 ` .
1716
18- ### Task 2: Create a Variable using let Keyword and log it to the console
17+ ###2 : Create a Variable using let Keyword and log it to the console
1918
2019 ** Code:**
2120 ``` jsx live
2726 - The console will display ` Hello Chai ` .
2827 - The variable ` Str ` is declared using ` let ` and assigned the value ` "Hello Chai" ` .
2928
30- ---
31-
32- ## Activity 2
3329
34- ### Task 3: Create a constant using const Keyword and log it to the console
30+ ### 3: Create a constant using const Keyword and log it to the console
3531
3632 ** Code:**
3733 ``` jsx live
4339 - The console will display ` true ` .
4440 - The constant ` bool ` is declared using ` const ` and assigned the value ` true ` .
4541
46- ---
4742
48- ## Activity 3
4943
50- ### Task 4: Make variables with different data types and print their type to the console
44+ ###4 : Make variables with different data types and print their type to the console
5145
5246 ** Code:**
5347 ``` jsx live
7872 ```
7973 - The types of the variables are printed using the ` typeof ` operator.
8074
81- ---
82-
83- ## Activity 4
8475
85- ### Task 5: Declare a variable using let Keyword and assign it a value and reassign its value
76+ ### 5: Declare a variable using let Keyword and assign it a value and reassign its value
8677
8778 ** Code:**
8879 ``` jsx live
10091 ```
10192 - The variable ` chai ` is declared using ` let ` , initially assigned the value ` "code" ` , and then reassigned the value ` "Hitesh Sir" ` .
10293
103- ---
104-
105- ## Activity 5
106-
107- ### Task 6: Make a constant using const Keyword and try to reassign the value and Identify the error
94+ ### 6: Make a constant using const Keyword and try to reassign the value and Identify the error
10895
10996 ** Code:**
11097 ``` jsx live
You can’t perform that action at this time.
0 commit comments