From fcf3f4d40049f6cd9fc34a19904ebbef31cf6de7 Mon Sep 17 00:00:00 2001 From: pramod kadam Date: Tue, 7 Sep 2021 15:25:24 +0530 Subject: [PATCH] if a number is >= 20000000 then decrease the number by one And make a recursive call and LET THE STACK OVERFLOWWWWWWWWW!!!!!!!!!!!! --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 3a8f581..3b5615e 100644 --- a/index.js +++ b/index.js @@ -40,6 +40,10 @@ function isOdd(number){ else if (number < 20000000 && number > 18000000){ return twentyMil(number); } + else{ + number = number - 1; + return isOdd(number); + } } export default isOdd; \ No newline at end of file