From b57525e72c11081d09826cae75650af4bb163f72 Mon Sep 17 00:00:00 2001 From: Isah Jacob Date: Mon, 31 Oct 2022 22:54:47 +0100 Subject: [PATCH] modified the function removed comments --- 09_palindromes/palindromes.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/09_palindromes/palindromes.js b/09_palindromes/palindromes.js index 50ca9c7..26295a8 100644 --- a/09_palindromes/palindromes.js +++ b/09_palindromes/palindromes.js @@ -3,11 +3,11 @@ const palindromes = function(string) { let reversedString = ( processedString - .split("") // ["v","u","d","a","n","g"] - .reverse() // ["g","n","a","d","u","v"] - .join("") // "gnaduv" + .split("") + .reverse() + .join("") ); - return processedString == reversedString; // false because "vudang" =! "gnaduv" + return processedString == reversedString; }; palindromes('racecar') // Do not edit below this line