DEV Community

loading...

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 Author

True and I have used that technique too.