标签:
1 var isPalindrome = function(x) {
2 var xR = 0,
3 xP = x > 0 ? x : -x;
4
5 while (xP != 0) {
6 xR = xR * 10 + (xP % 10);
7 xP = Math.floor(xP / 10);
8 }
9
10 return Math.abs(xR - x) < 0.000001;
11 };
标签:
原文地址:http://www.cnblogs.com/HuoAA/p/5074236.html