function fibonacci(num){
return new Promise((resolve, reject) => {
var a = 1, b = 0, temp;
while (num >= 0){
temp = a;
a = a + b;
b = temp;
num--;
}
resolve(b);
});
}
for (let i = 0; i < 100; i++) {
fibonacci(i).then(() => {})
}
async function fibonacci(num){
var a = 1, b = 0, temp;
while (num >= 0){
temp = a;
a = a + b;
b = temp;
num--;
}
return b;
}
for (let i = 0; i < 100; i++) {
fibonacci(i).then(() => {})
}