```
*/
var isPalindrome = function(x) {
if(x < 0) return false;
var original = x;
var length = Math.log(x) * Math.LOG10E + 1 | 0;
var reverse = 0;
while (original !== 0){
var modulus = original % 10;
original = Math.floor(original / 10);
reverse += modulus * Math.pow(10, length - 1);
length--;
}
return (x === reverse) ? true : false ;
};
```