- 2

Poor wording

this sentence makes no sense: "where iterable is an array" Therefor, i don't understand it. ES6 Map & Set

25th Apr 2020, 5:09 AM
John Weiss
John Weiss - avatar
2 Antworten
+ 3
iterable are objects with numeric index. array is one of iterable with array methods. other iterables include NodeList, HTMLCollection, etc.
25th Apr 2020, 6:02 AM
Gordon
Gordon - avatar
+ 2
That sentence makes complete sense. Syntax of making a set is new set([iterable]), so you have to pass an Array as iterable. Like new set([10,20,30,40])
25th Apr 2020, 5:18 AM
Raj Chhatrala
Raj Chhatrala - avatar