Call Us : +91-8376986802 (Viber, WhatsApp)

How to test for bad numbers using JavaScript?



the global method, “isNaN()” can tell if a number has gone bad.
var temperature = parseFloat(myTemperatureWidget.value);
if(!isNaN(temperature)) {
alert(“Please enter a valid temperature.”);
}

Leave a Reply