title: "Expected , but found }" Error
body: <p>Just a quick debugging question. I'm new to Javascript, and I'm creating a scheduling program with a group. My job is to take the user-inputted classes and output arrays of the required and optional classes. (each array element is a 1-element array containing a class object, except for when there are multiple sections of a class).  I agree that returning these 2d arrays is a non-efficient way to do this, but it's what the people working on creating all possible schedules want.</p>
  
  <p>I'm getting a syntax error that I don't understand, and I was wondering if anyone can spot what's causing it. Thanks in advance if you can. Here's the first part of my code where it pops up.</p>
  
  <pre><code>for(var m = 0; m &lt; numClasses; m++){
      $.getJSON("http://vazzak2.ci.northwestern.edu/courses/?term=4540&amp;subject="+optCourses[m].subject, function(result) {
          $(result).each(function (index, item) {
          if (item.start_time &gt; startTime) {
              if (item.end_time === endTime){
              if (item.catalog_num === optCourses[m].courseNumber){
  
                  var coursject = {
                      title: item.title,
                      professor: item.instructor.name,
                      catalog_num: item.catalog_num,
                      section: item.section,
                      subject: item.subject,
                  meeting_days: item.meeting_days,
                  start_time: item.start_time,
                  end_time: item.start_time
                      };
                  OptclassList[i] = coursject;
                  console.log(OptclassList[i]);
                  i++;
                                                                      }
                                              }
                                              }        
                                              }
       } //**ERROR: Expected , but found }**
                                      }
  
      var OptcourseArray = [];   // **ERROR: Expected , but found var**       
      for(var j = 0; j &lt; numOptCourses; j++){
          var catNum = optCouses[j].courseNumber;
          for(var h = 0; h&lt;OptclassList.length; h++){
                  var myArray = [];
                  if (OptclassList[h].catalog_num == catNum){
                      myArray.push(OptclassList[h]);
                  }
          }   
      OptcourseArray.push(myArray);
      }
  </code></pre>