Neosoft 2024
function parent(num) { let str = "";
for (let index = 0; index < num; index++) { str += fib(index) + ","; } return str; }
function fib(num) { //base condition if (num === 0 || num === 1) { return 1; }
return fib(num - 1) + fib(num - 2); }
//console.log(parent(10));
//-------------------------------------------------------------------------------
function palCaller(number) { let flag = false; for (let i = number; i < 115; i++) { flag = isPalindrome(i); console.log("flag", flag); } }
function isPalindrome(num) { let strNum = String(num); console.log(strNum); const length = strNum.length; if (length == 0 || length == 1) { return true; }
if (strNum.charAt(0) === strNum.charAt(length - 1)) { isPalindrome(strNum.slice(1, length - 1)); } else { return false; } }
console.log(palCaller(105));