1
function isPalindrome(str) {
const newVal = str.split('').reverse().join('')
return str === newVal
}
console.log(isPalindrome('abcdedcba'))
1
判断是否回文
阅读 178
2022-02-22
1
function isPalindrome(str) {
const newVal = str.split('').reverse().join('')
return str === newVal
}
console.log(isPalindrome('abcdedcba'))
1
相关推荐
精彩评论(0)