From ed30a5e03e53bd26695589a87478a346104ffcbf Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Mon, 15 Oct 2018 08:07:36 +0300 Subject: [PATCH] Update palindrome.md --- snippets/palindrome.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/palindrome.md b/snippets/palindrome.md index a231afeb2..eccf8cb0a 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 the string `String.prototype.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.prototype.toLowerCase()`. +Convert the string to `String.prototype.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 to `String.prototype.toLowerCase()`. ```js const palindrome = str => {