1 parent ada15f4 commit 98732c6Copy full SHA for 98732c6
1 file changed
02_variable/index.js
@@ -0,0 +1,25 @@
1
+console.log("variable")
2
+
3
+let a=67 //a container holds 67 . here a is identifier , = is assingment operator and 67 is literal(a contant value it can be string, num etc.)//
4
5
6
+console.log(a)
7
8
+// in Java Script you can change the data type at run time just like a=num then a= string//
9
10
+a="ayush"
11
12
13
+// rules for variable name
14
+// letters, digit, underscore, $ sign allowed.
15
+//must begin with a $, _ and Letter
16
+// it is case sensitive
17
+//JavaScript reserved word cannot be used as a variable name
18
19
+let ayush=7
20
+// let 9ayush=3 it can't allow
21
+let $ayush=2
22
+let Ayush=7
23
+// let var=3 not allowed because var is reserved word
24
25
+console.log(ayush,$ayush, Ayush) // if you run this code you wil see "Ayush" not equal to "ayush"
0 commit comments