Compare commits

...

2 Commits

Author SHA1 Message Date
shreyasingh28
dd8b70c778
Merge 809a3940fb into 2c67b48c21 2024-04-25 08:17:42 +08:00
shreyasingh28
809a3940fb
create fibonacci code 2019-10-07 10:45:00 +05:30

16
fibb.js Normal file
View File

@ -0,0 +1,16 @@
var fibonacci_series = function (n)
{
if (n===1)
{
return [0, 1];
}
else
{
var s = fibonacci_series(n - 1);
s.push(s[s.length - 1] + s[s.length - 2]);
return s;
}
};
console.log(fibonacci_series(8));