是不是回文字符
var isPalindrome = function(x) {
let y = []
if(x<0)return false
if(x<10)return true
let n = 10 ** Math.floor(Math.log10(x))
while(x>1 && n>1){
if(Math.floor(x/n) !== x%10)return false
x = Math.floor((x%n)/10)
n = n/100
}
return true
};
console.log(isPalindrome(12421))