Skip to content

Commit 10e9e05

Browse files
committed
added some notes over object
1 parent ab44407 commit 10e9e05

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

04_objects/01_obj_basics.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ const JsUser = {
1010
age: 22,
1111
location: "Bankura",
1212
isLogged: false,
13-
[mySymbol]: "key1"
13+
[mySymbol]: "key1",
14+
"full-name" : "Soureen Laha"
1415

1516
}
1617
//there is a datatype called symbol in javascript
1718

1819
console.log(JsUser.email);
1920
console.log(JsUser[mySymbol]);
2021
console.log(typeof mySymbol);
22+
console.log(JsUser["full-name"]);
2123

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

Comments
 (0)