8000 Update fibonacci.js · M-Munk/javascript-exercises@3b51e5d · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b51e5d

Browse files
authored
Update fibonacci.js
1 parent abcaeb9 commit 3b51e5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fibonacci/fibonacci.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const fibonacci = function(count) {
22
if (count < 0) return "OOPS";
3+
if (count == 0) return 0;
34
let a = 0;
45
let b = 1;
56
for (let i = 1; i < count; i++) {

0 commit comments

Comments
 (0)
0