Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save maskaravivek/2688f6171b149b18ae2a7d06b4f82728 to your computer and use it in GitHub Desktop.
Save maskaravivek/2688f6171b149b18ae2a7d06b4f82728 to your computer and use it in GitHub Desktop.
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