function Palindrome(str) { return ( str.replace(/\s/gi, '') === str .replace(/\s/gi, '') .split('') .reverse() .join('') ); }copy
function Palindrome(str) { return ( str.replace(/\s/gi, '') === str .replace(/\s/gi, '') .split('') .reverse() .join('') ); }