Created
August 31, 2024 06:34
-
-
Save maskaravivek/097b1d19f04ee6ec2f3361953e534595 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) { | |
const 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