1 parent ab44407 commit 10e9e05Copy full SHA for 10e9e05
1 file changed
04_objects/01_obj_basics.js
@@ -10,12 +10,15 @@ const JsUser = {
10
age: 22,
11
location: "Bankura",
12
isLogged: false,
13
- [mySymbol]: "key1"
+ [mySymbol]: "key1",
14
+ "full-name" : "Soureen Laha"
15
16
}
17
//there is a datatype called symbol in javascript
18
19
console.log(JsUser.email);
20
console.log(JsUser[mySymbol]);
21
console.log(typeof mySymbol);
22
+console.log(JsUser["full-name"]);
23
24
+//notes : using the jsuser.email is not a good practise, rather than we should use ["then the key name"] this is the way it can be use all the time
0 commit comments