A palindrome is a word or sentence like mom that you can reverse, and it's still mom. To check for palindromes in JavaScript we need to convert our input string to lowercase and remove all whitespace. We we split every character and reverse the array, then we rejoin that array in reversed order. The last step is to check if they are equal.

•2m read time•From h.daily-dev-tips.com
Post cover image

Sort: