Missing ] after element list
<p>I am using a growl like jquery script I got on the web which has the following:</p>

<pre><code>    template: function (title, message) {

        var e;

        e = [
            '&lt;div&gt;',
            '&lt;div class="background"&gt;',
            '&lt;div class="content"&gt;',
            '&lt;h2&gt;' + title + '&lt;/h2&gt;',
            '&lt;p&gt;' + message + '&lt;/p&gt;',
            '&lt;/div&gt;',
            '&lt;/div&gt;',
            '&lt;span class="icon"&gt;&lt;/span&gt;',
            '&lt;span class="close"&gt;&lt;/span&gt;',
            '&lt;/div&gt;'
        ].join("");

        return e;
    }
</code></pre>

<p>Which is called by "this.element = $(this.options.template(title, message));" elsewhere.</p>

<p>I get the "Missing ] after element list" error but the list seems to be closed with a "]".</p>

<hr>

<p><em><strong>UPDATE</em></strong></p>

<p>The proposed solutions related to the semi colon do not work. So maybe it is something else as some have stated.</p>

<p>I have pasted the js file on <a href="http://pastebin.com/q6rqUa3S" rel="nofollow">pastebin.com</a>.</p>

<p>By the way, the desired effect is seen and had always been so. It is just that Firebug in FireFox and the Web Inspector in Safari and Chrome all each show four errors related to this.</p>

<p>Something that might be relevant is that while watching closely, I notice that the error does not come up until "self.flash("end");" on Line 86 is triggered.</p>

<p>Perhaps very pertinent is that the whole flash thing is a hack I added to the original code.</p>

<hr>

<p><em><strong>UPDATE 2</em></strong></p>

<p>Thanks to the answers and comments below, particularly from "am not i am", I have moved on a bit but still need some help to cross the finish line.</p>

<p>If you refer to my earlier update and the pastebin, it turns out that the issue appears to have been with the "flash" function.  I have updated this as shown below: </p>

<pre><code>flash: function (mode) {
    var self, delay, trailerDelay, interval, iterations, fadeMe;


    if (mode == "start") {
        trailerDelay = 5;
        interval = this.options.startFlashInterval;
        iterations = this.options.startFlashTimes * 2;
        delay = this.options.startFlashDelay + interval;
    } else {
        trailerDelay = this.options.endFlashDelay;
        interval = this.options.endFlashInterval;
        iterations = this.options.endFlashTimes * 2;
        delay = 5;
    }

    if (iterations &lt; 2) {
        iterations = 2;
    }

    self = this;
    fadeMe = function () {
        self.element.animate({opacity: 'toggle'}, {duration: interval})
    };

    setTimeout(fadeMe, delay);
    setTimeout(fadeMe, interval);

    for(var i = 2; i &lt; iterations; i++) {
        setTimeout(fadeMe, interval);
    }

    setTimeout(function() {var x = 1}, trailerDelay);

},
</code></pre>

<p>However, while this gets rid of the error, I also do not get the flashing effect. BAsically, the fadeMe function has no effect. I know it gets called as using an alert there shows up. I have tried various configurations of this with the same result. Will appreciate some eyes on this.</p>

<hr>

<p><strong>SOLVED</strong></p>

<p>Needed a separate function to handle what the setTimeout calls were doing.</p>

<pre><code>    toggle: function (interval, delay) {
        setTimeout(function() {}, delay);
        this.element.animate({opacity: 'toggle'}, {duration: interval});
    },

    flash: function (mode) {
        var delay, trailerDelay, interval, iterations, i;

        if (mode == "start") {
            trailerDelay = 5;
            interval = this.options.startFlashInterval;
            iterations = this.options.startFlashTimes * 2;
            delay = this.options.startFlashDelay + interval;
        } else {
            trailerDelay = this.options.endFlashDelay;
            interval = this.options.endFlashInterval;
            iterations = this.options.endFlashTimes * 2;
            delay = 5;
        }

        if (iterations &lt; 2) {
            iterations = 2;
        }

        this.toggle(interval, delay);
        for(i = 1; i &lt; iterations; i++) {
            this.toggle(interval, interval);
        }

        setTimeout(function() {}, trailerDelay);

    },
</code></pre>

<p>Accepted "am not i am's" answer.</p>
