isPalindrome Posted on 2019-09-28 Edited on 2019-10-16 In JavaScript 1234567/** * @param {string} s * @return {boolean} */var isPalindrome = function(s: string): boolean { return s.replace(/[^0-9a-z]/gi, '').toLowerCase().split('').every((item, i, arr)=>item === arr[arr.length-1-i])};