title: Can not read property 'push' of undefined
body: <p>I can not read property of push of undefined. Why is it undefined? When I do <code>console.log(columnsArray[i])</code> it shows me the value. I don't understand.</p>
  
  <pre><code>var columnsArray = ["col1","col2","col3"];
  var indexArray = [];
  function submitIndex() {
    for (var i = 0; i &lt;= columnsArray.length ; i++) {
      if ($("#" + columnsArray[i]).is(":checked") === true) {
        indexArray.push(columnsArray[i]); 
      } else {
        console.log(columnsArray[i] + "is not checked");
      }
    } 
    var indexArray = indexArray.filter(onlyUnique);
    console.log(indexArray);
  }
  </code></pre>