title: SyntaxError: Unexpected EOF in JS
body: <p>I have the following script:</p>
  
  <pre><code>function getMoods(nb) {
      var index;
      var a = ["Banana", "Coconut", "Peach", "Apple", ...];
      for (index=0; index&lt;nb; ++index) {
          alert('a');
          if(index==1 || index==5 || index==9 || index==13) { moods += '&lt;div class="col-xs-4"&gt;'; }
              moods += '
                  &lt;div class="checkbox"&gt;
                      &lt;label for="'+a[index]+'"&gt;
                          &lt;input type="checkbox" id="'+a[index]+'" class="moods"&gt; '+a[index]+'
                      &lt;/label&gt;
                  &lt;/div&gt;';
          if(index==4 || index==8 || index==12) { moods += '&lt;/div&gt; '; }
      }
      $("#moods-area").html(moods);
  }
  </code></pre>
  
  <p>I do not understand why I have the following error:</p>
  
  <pre><code>SyntaxError: Unexpected EOF
  </code></pre>
  
  <p>Could you please help me ?</p>