Created
August 31, 2024 07:11
-
-
Save maskaravivek/2688f6171b149b18ae2a7d06b4f82728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateFibonacciSeries(n) { | |
let series = [0, 1]; | |
for (let i = 2; i < n; i++) { | |
series[i] = series[i - 1] + series[i - 2]; | |
} | |
return series; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment