I need help asap dude's ijfa

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function palindrome(str) {
palindrome("race car");

return true;
palindrome("not a palindrome");
return false;

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36

Challenge: Palindrome Checker

Link to the challenge:

Sorry but what are you even doing there?
First off, you should check for palindromes NOT hardcode the solution.
Second you are calling the function inside itself without any conditions applied - so that will just cause an infinite recursion.

I mean, you are trying a switch case, which would work if you knew how - but it would completly go against the purpose of the task.
However as it stands, it looks like you have no idea what a function is and how it is used. Sooo you better go back to the previous lessons where this is taught. Because there is litereally nothing in this code that makes sense.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.