Palindrome check
EasyStrings · JavaScript
The task
Write isPalindrome(s) that returns true if s reads the same forwards and backwards, and false otherwise.
Ignore upper and lower case, and ignore everything that is not a letter or a digit. An empty string counts as a palindrome.
Examples
- isPalindrome("A man, a plan, a canal: Panama") returns true
- isPalindrome("hello") returns false
Your code runs in your browser, in a separate worker, and is never sent to us. Edit the function, then press Run tests. Your work is saved here as you type.
JavaScriptCtrl or Cmd + Enter to run