🎯 The challenge
Write a function that — given a string — returns true if the string is a palindrome or false otherwise.
Let's look at 11 different approaches to solving this in JavaScript 👇🧵
👌 The definition
A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as taco cat or madam or racecar or the number 10801.
- Wikipedia
According to the definition, we need to strip potential non-alphanumeric characters thus convert to lower-case.
So in all of the following solutions, we will be using a "clean" function to get a clean sequence of characters.