回文判断
课程:Javascript · 编程练习
JavaScript编程练习 - 回文判断
练习内容
// 判断字符串是否为回文\nfunction isPalindrome(text) {\n const cleaned = text.toLowerCase().replace(/\s+/g, "");\n return cleaned === cleaned.split("").reverse().join("");\n}\n\nfunction isPalindromeTwoPo
课程:Javascript · 编程练习
JavaScript编程练习 - 回文判断
// 判断字符串是否为回文\nfunction isPalindrome(text) {\n const cleaned = text.toLowerCase().replace(/\s+/g, "");\n return cleaned === cleaned.split("").reverse().join("");\n}\n\nfunction isPalindromeTwoPo