|
I'm trying to get the error handling down. I've added the following statement:
if(reply != "Stars" || reply != "S" || reply != "Planets" || "P" ||); {
number = prompt(reply + " is improper input!!- run the program again.")
But this makes it so an error message comes up when the user types in the number for the star or planet. I just saw something called try/catch/finally. Is that the correct way to handle invalid input?
|