JavaScript Algorithms and Data Structures Projects--- Palindrome Checker

JavaScript Algorithms and Data Structures Projects--- Palindrome Checker
0

#1

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;
}

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker


#2

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.