diff --git a/snippets/palindrome.md b/snippets/palindrome.md index 41924bc84..54de6e5a3 100644 --- a/snippets/palindrome.md +++ b/snippets/palindrome.md @@ -2,8 +2,8 @@ Returns `true` if the given string is a palindrome, `false` otherwise. -Convert string `String.toLowerCase()` and use `String.prototype.replace()` to remove non-alphanumeric characters from it. -Then, use the spread operator (`...`) to split string into individual characters, `Array.prototype.reverse()`, `String.prototype.join('')` and compare to the original, unreversed string, after converting it `String.tolowerCase()`. +Convert the string `String.toLowerCase()` and use `String.prototype.replace()` to remove non-alphanumeric characters from it. +Then, use the spread operator (`...`) to split the string into individual characters, `Array.prototype.reverse()`, `String.prototype.join('')` and compare it to the original, unreversed string, after converting it `String.toLowerCase()`. ```js const palindrome = str => {