JavaScript Algorithms and Data Structures Projects--- Palindrome Checker

Stuck Guys, i need the force… were is the Code Masters At… May day, May day FCC STUCKED LEARNER COME IN…:rofl: Kind assist us to understand what’s wrong.

  let nonAL = str.toLowerCase().split(/\W/);

  if(nonAL === nonAL.reverse()) {
    return true;
  return false;

Not sure why you are splitting str using /\W/, I guess you were trying to remove the non word characters?

You can not compare arrays like this. I suggest your join nonAL back together and join nonAL.reverse() back together and try comparing two strings.

1 Like