Answers for "how do fibonacci numbers work"

0

Fibonacci numbers

function Fibonacci(num){
	        var before = 0;
	        var actual = 1;
	        var next = 1;

	        for(let i = 0; i < num; i++){
		        console.log(next)
		        before = actual + next;
		        actual = next
		        next = before
	        }
        }

        Fibonacci(100);
Posted by: Guest on December-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language