Ad
Code
Diff
  • function isPalindrome(x) {
      const xReverse = x.split("").reverse().join("");
      return !!(xReverse.toLowerCase() === x.toLowerCase())
    }
    • function Palindrome(s) {
    • let a=-1, z=s.length;
    • while(++a < --z)
    • if(s[a] != s[z])
    • return false;
    • return true;
    • function isPalindrome(x) {
    • const xReverse = x.split("").reverse().join("");
    • return !!(xReverse.toLowerCase() === x.toLowerCase())
    • }