Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

i don't even understand what's the problem i need to solve? like what is he even asking us to do?

what are we supposed to do? just type out an array and then print it to the page? I dont understand what the problem we need to solve is.. i watched the video 4 times and i still dont understand what he's asking me to do

"creates a script that creates a bunch of student records then print those records to a web page" firstable how are you create a script thats going to "create" the student records, the students records i have to type them, so is all i have to do just print it? i have a hard time understanding the point of this

Sergio Garza
Sergio Garza
6,892 Points

I believe you are not solving any "problem" yet. This is just a test so you can see yourself if you know the correct syntax when creating an array that contains objects. There are other challenges that build up from what you create here.

3 Answers

Anas AlHariri
Anas AlHariri
8,776 Points

Hi my Friend Omanr,

He thought us about object and arrays, and now he wants us to make a program that has a code that has students' records that we can deal with later. While this is only the first part of the challenge I can tell that nothing clear about it.

Programming not always about solving problems. Sometimes it's about creating a solutions to make life easier. Just like instead of searching drawers in a school for a student record to check those information we are about to make. You can grab it just with this solution that provides you an easy way to deal with Data such as the student records.

Can you imagine that you need to check the percentage of passing to failing students in a school. How long would it take to check each record and make the required mathematical operations to get this done. While having a program that can store Data as an object makes it clearly way easier.

So, There is no problem to solve here, but instead we are making a program that makes life easier with dealing with Data through storing them in an object that can be sent later to a server to store them and retreat them when ever you need to check or edit them or even do mathematical operations on them.

So, for now and for the first step of this challenge we have to prepare the students' records data in a shape of using Array of Object. Each object contains a student record. So later we can continue the challenge by testing our ability to make a program that stores the data and display it for future purposes. Such as dealing with data from a server that we receive in JSON format which is at the end is an array of objects or object of objects.

In the future lessons we will do that. But now we need to make sure that we know how to do the basics first. And that's what this challenge is about.

Wish you goodluck, Gabriel Alhariri

Huseyin Erkmen
Huseyin Erkmen
11,268 Points

This challenge has two steps. On first step you just need to create an array with at least 5 objects. That is it. Problem is on the second step.

don graham
don graham
13,789 Points

Hi Omar,

It's a lot easier than you might think. As the instructor says, you must create a data type to hold your objects. Let's take it one step at a time.

step 1: create an array to hold the students

var students = [];

step 2: fill the array with five student objects

var students = [
{},
{},
{},
{},
{},
];

step 3: give each object the following properties:

  • 'name': ...
  • 'track': ...
  • 'achievements': ...
  • 'points': ...
var students = [
/* example:
   {
      name: 'user name',
      track: 'track name',
      achievements: 23,
      points: 1000
    }
*/
 {
  key: 'value',
  key: 'value',
  key: 'value',
  key: 'value'
 },
 {
  key: 'value',
  key: 'value',
  key: 'value',
  key: 'value'
 }
  ...
];

Hope this clears things up a bit.

i' sorry but I still don't understand whats the point of this or whats the problem that im supposed to solve.... whenever i program something theres a problem and i use programing to solve it here i just dont understand what the problem is. i am confident i can solve whatever problem there is but i just dont understand what i need to solve for. i jsut dont understand what he's asking me to do.