Added handling of string case for 0

This commit is contained in:
Miko 2023-09-18 23:01:33 +02:00 committed by GitHub
parent 85a9d56fde
commit f2c0d0955b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
const fibonacci = function(count) { const fibonacci = function(count) {
if (count < 0) return "OOPS"; if (count < 0) return "OOPS";
if (count === 0) return 0; if (count == 0) return 0;
let firstPrev = 1; let firstPrev = 1;
let secondPrev = 0; let secondPrev = 0;