fixed some spellings

This commit is contained in:
Keshav Bohra
2021-10-05 12:49:23 +05:30
parent 199d2637cc
commit 1589263947
41 changed files with 80 additions and 80 deletions

View File

@ -8,7 +8,7 @@ const checkPalindrome = (str) => {
if (str.length === 0) {
return 'Empty string'
}
// Reverse only works with array, thus conevert the string to array, reverse it and convert back to string
// Reverse only works with array, thus convert the string to array, reverse it and convert back to string
// return as palindrome if the reversed string is equal to the input string
const reversed = [...str].reverse().join('')
return str === reversed ? 'Palindrome' : 'Not a Palindrome'