Merge pull request #232 from GeorgySerga/patch-5
Fix typo, 08-keys-values-entries
This commit is contained in:
commit
cceb7cbcc8
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ For plain objects, the following methods are available:
|
||||||
|
|
||||||
The first difference is that we have to call `Object.keys(obj)`, and not `obj.keys()`.
|
The first difference is that we have to call `Object.keys(obj)`, and not `obj.keys()`.
|
||||||
|
|
||||||
Why so? There main reason is flexibility. Remember, objects are a base of all complex structures in JavaScript. So we may have an object of our own like `order` that implements its own `order.values()` method. And we still can call `Object.values(order)` on it.
|
Why so? The main reason is flexibility. Remember, objects are a base of all complex structures in JavaScript. So we may have an object of our own like `order` that implements its own `order.values()` method. And we still can call `Object.values(order)` on it.
|
||||||
|
|
||||||
The second difference is that `Object.*` methods return "real" array objects, not just an iterable. That's mainly for historical reasons.
|
The second difference is that `Object.*` methods return "real" array objects, not just an iterable. That's mainly for historical reasons.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue