Generating Fibonacci Series using JavaScript Code

preview_player
Показать описание

Simple Program to generate first n Fibonacci numbers. Upto a limit entered by the user.

By definition, the first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two.
Рекомендации по теме
Комментарии
Автор

Sir if I want to use function fib serious then how I will do in JavaScript

malikshab
Автор

Not working for me :(( And I used the source code...

elipsus
Автор

100% coiped from website technotip.com

shubhamrana
Автор

function fibonnai(n) {
let num1 = 0;
let num2 = 1;
for(let i = 0; i < Math.ceil(n/2) ;i++) {
console.log(num1);
num2 = num1+ num2

console.log(num2);
num1 = num1+ num2;
}

if((n % 2) === 0) {
console.log(num1)
}
}
fibonnai(10);

Clark
Автор

Speaking english but dont know the spelling of series

thediaryxo_