To use the Try... Catch statement, you take any code you think could potentially result in an error, and wrap it within the
try statement. You then code what you want to happen in the event of an error and wrap that in a
Code without a Try... Catch statement:
The above code will result in an error. This is because the variable myBankBalance hasn't been declared yet.
Code with a Try... Catch statement:
The above code will hide the error and present something more user friendly to the user. This is because the code with the error was wrapped inside a
try statement. And, because there was an error, the browser outputs whatever is between the