JavaScript JavaScript Loops, Arrays and Objects Tracking Data Using Objects The Build an Object Challenge, Part 2 Solution

Hui Zheng
PRO
Hui Zheng
Pro Student 1,380 Points

My student list didn't print

I was following alone with this exercise, and I did everything according to the video step by step except I only added three object literals to my array. Nevertheless, everything else I did was exactly as what was instructed from the video. When I opened up the browser, only the student title was displayed but the student list didn't appear.

KRIS NIKOLAISEN
KRIS NIKOLAISEN
Pro Student 47,377 Points

Can you post a snapshot of your workspace? It is the camera icon in the upper right corner.

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 47,377 Points

I found three things to fix:

(1) Missing end quote for 'output' in print function

(2) Missing closing curly brace for print function

function print(message) {
  var outputDiv = document.getElementById('output');
  outputDiv.innerHTML = message;
}

(3) Missing script reference for students_report.js in index.html

<script src="js/students.js"></script>
<script src="js/students_report.js"></script>