Tell us what’s happening:
const inputInt = parseInt(numberInput.value);
if (!numberInput.value ||
isNaN(inputInt) ||
inputInt < 0) {
alert(“Please provide a decimal number greater than or equal to 0”);
return;
}
if (inputInt) === 5) {
showAnimation();
return;
}
i don’t know what else to do, my code doesn’t pass
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
const inputInt = parseInt(numberInput.value);
if (!numberInput.value ||
isNaN(inputInt) ||
inputInt < 0) {
alert("Please provide a decimal number greater than or equal to 0");
return;
}
if (inputInt) === 5) {
showAnimation();
return;
}
result.textContent = decimalToBinary(inputInt)
numberInput.value = ""
// User Editable Region
/* 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/130.0.0.0 Safari/537.36
Challenge Information:
Learn Recursion by Building a Decimal to Binary Converter - Step 78