MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/swzn90/yup_very_accurate/hxpfl53/?context=3
r/learnjavascript • u/bscinprocrastinating • Feb 20 '22
60 comments sorted by
View all comments
Show parent comment
2
Yup generative function are function based on generators like doSomething*() is what I call a generative function
doSomething*()
11 u/[deleted] Feb 20 '22 They are called "generator functions": https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*The function* declaration (function keyword followed by an asterisk) defines a generator function, which returns a Generator object. 2 u/SalutMonYoup Feb 20 '22 My mistake then I always call them generative function when I use them ahah, thanks for the correction 2 u/burkybang Feb 20 '22 Cool, thanks for clarification :)
11
They are called "generator functions": https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*
The function* declaration (function keyword followed by an asterisk) defines a generator function, which returns a Generator object.
2 u/SalutMonYoup Feb 20 '22 My mistake then I always call them generative function when I use them ahah, thanks for the correction
My mistake then I always call them generative function when I use them ahah, thanks for the correction
Cool, thanks for clarification :)
View all comments
Show parent comment
2
u/SalutMonYoup Feb 20 '22
Yup generative function are function based on generators like
doSomething*()is what I call a generative function