🚧 施工中
Last updated 2 years ago
Was this helpful?
JS ⟩ iteration ⟩ generator function ⟩ Generator
an iterable iterator returned by generator function.
methods of generators
next()
return()
🚧 throw()
- finite arithmetic sequence of integers
- closed range of integers
a generator object in JS is like a sequence in Swift with Self == Self.Iterator constraint.
generators are iterable iterators (i.e. iterable and iterators.)
JS.info ⟩ Generators
認識 JavaScript Iterable 和 Iterator
JavaScript: The Definitive Guide ⟩ 12. Iterators and Generators
Generator
Iterators and generators
*fibonacci() - infinite fibonacci seqence