I seem to be the only one having a problem with the .split(“”) part of my code. For days I’ve tried seeing what the issue could be that the console keeps saying filtered.split is not a function. Today I decided to check other queries but none is like mine. What am I doing wrong?
Your code so far
<!-- file: index.html -->
/* file: script.js */
return filtered === filtered.split("").reverse().join("")
? resultSlot.innerHTML = `${input.value} is a palindrome`
: resultSlot.innerHTML = `${input.value} is not a palindrome`
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Challenge Information:
Build a Palindrome Checker Project - Build a Palindrome Checker
return filtered === filtered.split(“”).reverse().join(“”)
? resultSlot.innerHTML = ${input.value} is a palindrome
: resultSlot.innerHTML = ${input.value} is not a palindrome
Yeah, filtered is the ultimate resulting string after trimming, converting to lower case and matching the characters using the regex. I just don’t understand the error when I try to ‘split’ it