Closed tlebon closed 3 years ago
Thanks! I updated the section as shown so that it makes clear the limitation is that you can't just plug in any object into for...of because it isn't an iterable. See
The original note was pretty much "you can do this if you have the keys" (which is true). The new one points more at how you would actually tend to add support for iteration.
OK?
seems nice to me.
Request type
Details
The 'iteration' row of the table comparing objects and maps has an issue for objects. It reads:
not necessarily true. In the same way maps are iterable with a for..of loop, so are objects with the for ...in, as of ES6. source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map