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

When you 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

What is required is above

btn.addEventListener("click", numberInput);
function numberInput(){
    
if(number === null && convert-btn.onclick("click")){
    output.textContent = "Please enter a valid number"
}


i want to display and output of please enter valid number after clicking convert button when the button is clicked and there is no text entered in the converter as defined in the if arguement however it wont pass

Your browser information:

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

Challenge Information:

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

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

where does the output variable comes from?
please show all your html and javascript

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