minor fixes

This commit is contained in:
Ilya Kantor 2022-04-15 08:05:10 +03:00
parent 0305a0b864
commit 7dc2a3c79d

View file

@ -1,11 +1,13 @@
# Symbol type # Symbol type
By specification, object property keys may be either of two primitive types: By specification, only two primitive types may serve as object property keys:
- string type, or - string type, or
- symbol type. - symbol type.
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"]`.
Till now we've been using only strings. Till now we've been using only strings.
Now let's explore symbols, see what they can do good for us. Now let's explore symbols, see what they can do good for us.