Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fibonacci(num){
- var a = 1, b = 0, temp;
- while (num > 0){
- temp = a;
- a = a + b;
- b = temp;
- num--;
- }
- return b;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement