Skip to content

Commit 7dc2a3c

Browse files
committed
minor fixes
1 parent 0305a0b commit 7dc2a3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

1-js/04-object-basics/08-symbol/article.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11

22
# Symbol type
33

4-
By specification, object property keys may be either of two primitive types:
4+
By specification, only two primitive types may serve as object property keys:
55

66
- string type, or
77
- symbol type.
88

9+
Otherwise, if one uses another type, such as number, it's autoconverted to string. So that `obj[1]` is the same as `obj["1"]` and `obj[true]` is the same as `obj["true"]`.
10+
911
Till now we've been using only strings.
1012

1113
Now let's explore symbols, see what they can do good for us.

0 commit comments

Comments
 (0)