Skip to content

Commit 80b4e82

Browse files
refactor: primitive datatypes
1 parent 6b5f32a commit 80b4e82

File tree

17 files changed

+18
-7
lines changed

17 files changed

+18
-7
lines changed

5_datatype/1_primitive_datatypes/4_symbol/1_symbol.js renamed to 05_datatype/01_primitive_datatypes/04_symbol/01_symbol.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ console.log(car[carId]);
3434
// Log the car object
3535
console.log(car);
3636

37+
// - The symbol property will not show up in a normal object log (it’s non-enumerable).
38+
// - To see symbol properties, use Object.getOwnPropertySymbols(car).
39+
3740
// Note
41+
3842
// - Symbol doesn't use `new` keyword. Because it's an primitive datatype.
39-
// - Primitive datatype doesn't required the `new` keyword.
40-
// - Only Object, Array and Function need it.
43+
// - Primitive datatype doesn't required the `new` keyword. Because they are basic, immutable values.
44+
// - Only Object, Array and Function need it because The new keyword is used to create instances.

0 commit comments

Comments
 (0)