1 parent dca5d8c commit ab44407Copy full SHA for ab44407
1 file changed
04_objects/01_obj_basics.js
@@ -0,0 +1,21 @@
1
+const mySymbol = Symbol("key1")
2
+
3
4
5
+//object literals
6
7
+const JsUser = {
8
+ name: "Soureen",
9
+ email: "soureenlaha@gmail.com",
10
+ age: 22,
11
+ location: "Bankura",
12
+ isLogged: false,
13
+ [mySymbol]: "key1"
14
15
+}
16
+//there is a datatype called symbol in javascript
17
18
+console.log(JsUser.email);
19
+console.log(JsUser[mySymbol]);
20
+console.log(typeof mySymbol);
21
0 commit comments