Try Catch Error Handling In JavaScript
Basic try/catch with JavaScript
javascript
And with [TODO: Code shorthand span ] that executes regardless of if an exception was thrown.
javascript
More details on MDN's try...catch page