Next palindrome

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));