This commit is contained in:
Nitin Singh 2023-06-07 14:42:01 -06:00 committed by GitHub
commit 95ebaadb50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
const fibonacci = function (count) { const fibonacci = function (count) {
if (count < 0) return "OOPS"; count = Number(count);
if (isNaN(count) || count < 0) return "OOPS";
if (count === 0) return 0; if (count === 0) return 0;
let a = 0; let a = 0;
let b = 1; let b = 1;