JSON/JavaScript Functionality/Implementation
<p>This code should: locate courses from the object that match the day of the button selected (for instance,Monday), then; sort that list based on the starting time. Due to the nature of the information in the Object, I converted them to their military equivalent for comparison purposes. Once that is done, it should finally display the list of sorted courses with the information specified in the statement.</p>

<p>When I select a button however, nothing occurs. Nothing is displayed, nor do I get any errors in my code when I compile it. </p>

<pre><code>var courses = [
  {
    "dept": "CSC",
    "id": "3102",
    "instructor": "Kooima",
    "Location": "230 Turead",
    "Start_Time": "1130",
    "End_Time": "1230",
    "Attendance": "Tuesday",
    "Full_Name": "Advanced Data Structures and Algorithm Analysis"
  },
  {
    "dept": "CSC",
    "id": "1200",
    "instructor": "Duncan",
    "Location": "420 PFT",
    "Start_Time": "1030",
    "End_Time": "1130",
    "Attendance": "Monday",
    "Full_Name": "Ethics in Computer Science"
  },
  {
    "dept": "CSC",
    "id": "4330",
    "instructor": "Mahmoud",
    "Location": "150 Coates",
    "Start_Time": "12:30",
    "End_Time": "1:30",
    "Attendance": "Thursday",
    "Full_Name": "Software Systems Development"
  },
  {
    "dept": "MATH",
    "id": "1550",
    "instructor": "Tom",
    "Location": "012 Lockett",
    "Start_Time": "12:30",
    "End_Time": "1:30",
    "Attendance": "Wednesday",
    "Full_Name": "Calculus"
  },
  {
    "dept": "ENGL",
    "id": "2000",
    "instructor": "McKinnon",
    "Location": "012 Allen Hall",
    "Start_Time": "9:30",
    "End_Time": "10:30",
    "Attendance": "Friday",
    "Full_Name": "English Composition"
  },
  {
    "dept": "THTR",
    "id": "1020",
    "instructor": "King",
    "Location": "619 MDMA",
    "Start_Time": "8:30",
    "End_Time": "9:30",
    "Attendance": "Wednesday",
    "Full_Name": "Introduction to Theatre"
  }

];

var courseDayList = new Array();

function converTime(time) {
  var numericTime = 0;
  if (time == "8:30") numericTime = 830;
  if (time == "9:30") numericTime = 930;
  if (time == "10:30") numericTime = 1030;
  if (time == "11:30") numericTime = 1130;
  if (time == "12:30") numericTime = 1230;
  return numericTime;
}

function showCourseFromDay(day) {
  var i;
  for (i = 0; i&lt;courses.length; i++) {
    var course = courses[i];
    console.log(course);
    if (course.Attendance == day) {
      courseDayList.push(course);
    }
  }
  courseDayList.bubbleSort = new function () {
    var swapped;
    do {
      swapped = false;
      for (var i = 0; i &lt; courseDayList.length - 1; i++) {
        var time1 = convertTime(courseDayList[i].Start_Time);
        var time2 = convertTime(courseDayList[i + 1].Start_Time);
        if (time1 &gt; time2) {
          var temp = courseDayList[i];
          courseDayList[i] = courseDayList[i + 1];
          courseDayList[i + 1] = temp;
          swapped = true;
        }
      }
    } while (swapped);
  }
  courseDayList.bubbleSort();
  courseDayList.printCourses = new function () {
    var counter = 0;
    while (counter == courseDayList.length) {
      var courseName = document.getElementById("cName");
      var courseTime = document.getElementById("cTime");
      var courseLocation = document.getElementById("cLocation");
      courseName.innerHTML = courseDayList[counter].dept + " " + courseDayList[counter].id + "- " + courseDayList[counter].Full_Name + "&lt;br /&gt;";
      courseTime.innerHTML = courseDayList[counter].Start_Time + "-" + courseDayList[counter].End_Time + "&lt;br /&gt;";
      courseLocation.innerHTML = courseDayList[counter].Location;
      counter++;
    }
  }
  courseDayList.printCourses();
}


&lt;div class="panel panel-default"&gt;
    &lt;div class="panel-heading"&gt;
        &lt;h4&gt;Today's Schedule&lt;/h4&gt;
        &lt;button class="btn btn-default" type="submit" onclick="showCourseFromDay('Monday')"&gt;Monday&lt;/button&gt;
        &lt;button class="btn btn-default" type="submit" onclick="showCourseFromDay('Tuesday')"&gt;Tuesday&lt;/button&gt;
        &lt;button class="btn btn-default" type="submit" onclick="showCourseFromDay('Wednesday')"&gt;Wednesday&lt;/button&gt;
        &lt;button class="btn btn-default" type="submit" onclick="showCourseFromDay('Thursday')"&gt;Thursday&lt;/button&gt;
        &lt;button class="btn btn-default" type="submit" onclick="showCourseFromDay('Friday')"&gt;Friday&lt;/button&gt;
    &lt;/div&gt;
    &lt;div class="panel-body"&gt;
        &lt;div style="border-color:rebeccapurple"&gt;&lt;/div&gt;
        &lt;ul class="list-group" ng-repeat="course in schedule"&gt;
            &lt;li class="list-group-item"&gt;
                &lt;h4 id="cName"&gt;&lt;/h4&gt;
                &lt;p id="cTime"&gt;&lt;/p&gt;
                &lt;p id="cLocation"&gt;&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>