题解 | #回文字符串#
回文字符串
https://www.nowcoder.com/practice/84424799af474ba093b06c29a1f12dfb
const _isPalindrome = string => { // 补全代码 for (let i = 0, j = string.length - 1; i < Math.ceil(string.length / 2), j >= Math.ceil(string.length / 2) - 1; i++, j--) { if (string[i] !== string[j]) return false } return true }