Jump to content

minor bug in tutorial on JavaScript "try" topic


joeteach4

Recommended Posts

This tutorial illustrates both try and catch statements.

The purpose of that line is to output the specific error that has been thrown in the try statement. "error detected" can mean anything between undefined variable to a syntax error. err.message will take the error message that would otherwise normally be put in the console, and put it into the demo <p> element.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...