目標は、予期しない単語を生成するプログラムを作成することです
私はそれを過去に読んでいませんでした。長い文章(およびエラーメッセージ)の読み取りに重大な問題があります。
「5」を警告する簡単なプログラムを作成することにしました。残念ながら、私はそれを機能させることができないようです。
(function () {
    "use strict";
    function logError(e) {
        // I have a serious issue with reading long error messages
        // I'll just print the first word of the error and figure out what it means
         console.log(e.message.split(" ")[0]);
    }
    // Useful assert method for debugging
    function assert(value, message) {
        if (value === false) {
            throw new Error(message);
        }
    }
    // Sets a varaible "a" to 5 and alerts it
    try {
        // Try it the old fashioned way
        a = 5;
        alert(a);
    } catch (e) {
        logError(e);
        // In some legacy browsers, that might now work
        // because alert requires a string
        try {
            // create objA which has a method "word", which always returns a word, or a string
            var objA = {
                word: function () {
                    return new String(5);
                }
            };
            // Make sure it is a string
            assert(typeof objA.word() === "string", "word didn't return a string");
            alert(objA.word());
        } catch (e) {
            logError(e);
            // Some browsers, such as chrome, just won't work
            // It's time to be evil and force them to work!
            try {
                eval("a = 5" +
                    "alert(a)");
            } catch (e) {
                logError(e);
            }
        }
    }
})();
Google Chromeコンソールでテスト済み。(文字通り)予期しない単語を生成します。
http://jsfiddle.net/prankol57/Af4sH/(jsfiddleの 
場合、コンソールを開く必要があります。HTML出力はありません)