🔰generator function
JS ⟩ iteration ⟩ generator function
defined by function* keyword and returns a Generator object.
use cases
generator function as ... (variable, method)
as make-iterator method of an iterable.
examples
*list() - sequence of numbers
composition of generator functions
Last updated
Was this helpful?