Step 78 - Building a Decimal to Binary Converter

Hi all, I believe I have replaced all instances of parseInt(numberInput.value) with inputInt, but when I try to submit my code, it doesn’t give any feedback (not even a “you did this wrong, here’s a hint”.

Here is the code I have written:

  const inputInt = parseInt(numberInput.value);

  if (!numberInput.value || isNaN(inputInt) {
    alert("Please provide a decimal number");
    return;
  }

  if (inputInt === 5) {
    showAnimation();
    return;
  }

  result.textContent = decimalToBinary(inputInt);
  numberInput.value = "";

There’s a syntax error in the first if. Take a look at the number of opened and closed parenthesis.

Omg thank you, I had clearly been looking at it too long without a break.

1 Like