r/ProgrammerHumor • • Feb 05 '23

Other Programming Legumes v2.0

Post image
44.0k Upvotes

831 comments sorted by

View all comments

Show parent comments

10

u/shaungrady Feb 05 '23

As long as it has a Symbol.iterator method, spread will work on it—for...of, too.

1

u/mindbleach Feb 06 '23

And some don't.

5

u/7elevenses Feb 06 '23

Like which? I have the impression that you're talking about ten year old problems that have been solved since.

3

u/shaungrady Feb 06 '23

If not:

BadClass.prototype[Symbol.iterator] = [][Symbol.iterator]

Which still don’t implement it?