Generation

generate functionTue, 06 Dec 2022

Request a string via a form input field, then check if it's not a number! Write the check your result in an alert window!

function checkNumber() { var input = document.getElemntById("input").value; if (isNaN(input) == true) { alert('Is not a number'); } else { alert('Is a number'); } }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant