DEV Community

Discussion on: Extending the Array class to calculate the Fibonacci sequence

Collapse
 
curtisfenner profile image
Curtis Fenner

This can very nearly be accomplished using Array(n) and .forEach, though you need two statements since forEach returns nothing.

Collapse
 
bugmagnet profile image
Bruce Axtens

True and I have used that technique too.