标签:spl style rev inf ever mamicode color com reverse
实现:
var isPalindrome = function(x) { let str = x.toString(); if (str.indexOf(‘-‘) === -1) { let temp = str.split(‘‘).reverse().join(‘‘); if (str === temp) { return true; } else { return false; } } else { return false } };
标签:spl style rev inf ever mamicode color com reverse
原文地址:https://www.cnblogs.com/Tiboo/p/12116973.html