문제 링크 : Palindrome Number
/**
* @param {number} x
* @return {boolean}
*/
var isPalindrome = function(x) {
if(x < 0) return false
let copy = x
let reverse = 0;
while(copy > 0) {
const mod = copy % 10;
reverse = reverse*10 + mod;
copy = parseInt(copy/10)
}
return reverse === x
};