This script demonstrates how to create a custom function in JavaScript. In this example, the custom function called
checkNumber()
was created to check whether a number falls within the range from 0 to 100. The
checkNumber()
function is called from the button's onClick event handler.
Please type in a number: