O'Reilly logo
  • Ivan Petrov thinks this is interesting:

        try {
            var myArray;
            for (var i = 0; i < myArray.length; i++) {
                console.log("Index " + i + ": " + myArray[i]);
            }
        } catch (e) {
            console.log("Error: " + e);
        }

From

Cover of Pro jQuery

Note

try catch