Build a Roman Numeral Converter Project - Build a Roman Numeral Converter

Tell us what’s happening:

I am trying to pass this step :
Whenever I click on the #convert-btn element without entering a value into the #number element, the #output element should contain the text “Please enter a valid number”.

Your code so far

<!-- file: index.html -->
<input id="number"></input>
<button id="convert-btn">Check</button>
<div id="output"></div>

/* file: styles.css */

/* file: script.js */

const convertBtn = document.getElementById("convert-btn")
const userOutput = document.getElementById("output");

convertBtn.addEventListener("click", () => {
const numberInput = document.getElementById("number");
if (numberInput.value === "") {
    userOutput.textContent = "Please enter a valid number";
}
});
 

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0

Challenge Information:

Build a Roman Numeral Converter Project - Build a Roman Numeral Converter

HTML needs to have the script tag, which will allow using the JS code from another file.