Handling errors in JavaScript

A simple example of handling errors in JavaScript with try, catch and finally.