Passed first test in exercise 09

Converting string to array, reversing array, reconverting array to string
This commit is contained in:
NetMan 2024-01-11 10:08:59 +01:00
parent afbd11dad1
commit 27551435b6
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
const palindromes = function () { const palindromes = function (string) {
const reversed = string.split("").reverse().join("");
if (reversed === string) {
return true;
}
return false;
}; };
// Do not edit below this line // Do not edit below this line