Determine whether a string is a palindrome.
Contributed by @iarpitsaxena
function isNumericPalindrome(num) {
// Convert the number to a string
const str = num.toString();
// Check if the string is equal to its reverse
return str === str.split("").reverse().join("");
}
isNumericPalindrome(12345); // false
isNumericPalindrome(121); //true