Learn Recursion by Building a Decimal to Binary Converter - Step 12

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

Hi @Coder_2024_Eng

The last character needs to be upper case.

Happy coding

2 Likes

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