I have updated your post to include a direct link to the challenge. It’s helpful if you can include this as it makes it easier for others to assist.
One key point in the instructions:
Note: You’ll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes.
Your replace is only removing spaces, so you’ll need to modify it.
Here is the new code… I think its working from my machine…
Removing spaces and special characters separately because couldn’t figured out how to do them at once… also going to lower case to remove upper case letters…
I think the problem is now in the “return” so the FCC website would like it…
Can I ask what you mean by “making the return work for FCC was a bit silly”? Looking at the code you just shared, I don’t see a return statement - just as @nhcarrigan mentioned above. You are only logging variables to the console, rather than returning them from your function, which is required for evaluation by FCC.
I’m glad you got it working, but I’m unsure what problem is being caused by submitting your code on this site in this situation.
You can also get rid of the ternary all together and just return the result of using the strict equality operator since that would return a true false anyway.
There is nothing silly about requiring a function to actually produce a value or have a side-effect. If a function does not return anything or alter outside variables, it isn’t doing anything.
Logging by itself does nothing and it has zero value in an application other than for the developer to look at values. You do not ask your users to open the browser console so they can use your app.