From 3b51e5dbefcb2292372c71eb3ac7d18a93a8948a Mon Sep 17 00:00:00 2001 From: Cody Loyd Date: Wed, 29 Jan 2020 10:52:57 -0600 Subject: [PATCH] Update fibonacci.js --- fibonacci/fibonacci.js | 1 + 1 file changed, 1 insertion(+) diff --git a/fibonacci/fibonacci.js b/fibonacci/fibonacci.js index b2d7689..dbb906a 100644 --- a/fibonacci/fibonacci.js +++ b/fibonacci/fibonacci.js @@ -1,5 +1,6 @@ const fibonacci = function(count) { if (count < 0) return "OOPS"; + if (count == 0) return 0; let a = 0; let b = 1; for (let i = 1; i < count; i++) {