Re:Things I Learned Writing a Fibonacci Generator in JavaScript
by dvlsg on Tuesday May 17, 2016 @02:38AM
(#11711717)
Closures aside, a somewhat significant difference between the two is that the generator would yield each value in the sequence, whereas yours would just return a single value from the sequence. Which might be perfect, depending on the use case, but they're not quite the same.
[ Parent
| on HN ]