Tell us what’s happening:
Update the second condition in your if
statement to use the isNaN()
function to check if the value returned by parseInt()
is NaN
.
Your code so far
const checkUserInput = () => {
if (!numberInput.value || isNan(parseInt(numberInput.value))) {
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0
Challenge Information:
Learn Recursion by Building a Decimal to Binary Converter - Step 12