typo + add link to relevant chapter
This commit is contained in:
parent
1b2d3e8010
commit
114c4823fb
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
The method can take all enumerable keys using `Object.keys` and output their list.
|
||||
|
||||
To make `toString` non-enumerable, let's define it using a property descriptor. The syntax of `Object.create` allows to provide an object with property descriptors as the second argument.
|
||||
To make `toString` non-enumerable, let's define it using a property descriptor. The syntax of `Object.create` allows us to provide an object with property descriptors as the second argument.
|
||||
|
||||
```js run
|
||||
*!*
|
||||
|
@ -27,3 +27,5 @@ alert(dictionary); // "apple,__proto__"
|
|||
```
|
||||
|
||||
When we create a property using a descriptor, its flags are `false` by default. So in the code above, `dictionary.toString` is non-enumerable.
|
||||
|
||||
See the the chapter on [Property flags and descriptors](http://javascript.info/property-descriptors) for review.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue