Palindrome Checker test

Tell us what’s happening:
"almostomla" didn’t pass test i need help please
thank you

Your code so far


function palindrome(str) {
 
  var remove=str.split(/[^a-zA-Z0-9]/).join("").toLowerCase();

  for(var i=0;i<remove.length/2;i++){
 
  for(var j=remove.length-1;j>remove.length/2-1;j--){  
     
if( remove[i]==remove[j]){
return true
 }else{return false}
  }

}}



palindrome("almostomla");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; rv:82.0) Gecko/20100101 Firefox/82.0.

Challenge: Palindrome Checker

Link to the challenge:

why are you checking only one single character?

also, note that if you use two different loops you are never going to check just first letter with last, second with second to last etc

i change code completely it work thank you iealeen

awesome job!

happy coding!

1 Like