There is such a thing as generator functions in JavaScript and they let you define functions that return Generator objects. The syntax for defining a generator function is nearly the same as for defining a regular function. function* makeIterator() {...
Markdown supported · ⌘↵ to post
No responses yet.