explain to a non programming dummy 1

Write JavaScript®code that anticipates and handles an error for an expected numeric field. This code is executed on keypress, and the entered value is saved for you in a variable called enteredChar. Include the try block of JavaScript®statements needed to check if the character is not a number or a non-alphanumeric character, or if you throw an error message.