📅  最后修改于: 2022-03-11 14:55:45.139000             🧑  作者: Mango
// FIBONACCI SERIES
// 0 1 1 2 3 5 8 13
let number = 7;
// let a=0,b =1,next;
let a=-1,b=1,next;
for(let i=1;i<=number;i++){
next= a + b;
a = b;
b = next
console.log(next)
}