Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNenad Milosavljevic
2,152 PointsI have no clue what is happening here
I know what is object literal, I have used 3 and there is still an error
var objects = [
];
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Objects</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
4 Answers
Juan Lopez
Treehouse Project ReviewerGreat job on completing Challenge 1 . Now All that you have to do for challenge 2 is put in 3 object literal with 2 prop/val pairs. So it should be something like this
var objects = [
{name:'John',age:16},
{name:'Jill',age:18},
{name:'Jack',age:17}
]
Antonio De Rose
20,885 Pointsyes, so you got the first question right, and what have you tried on the second question.
Nenad Milosavljevic
2,152 PointsOh, I see, that part wasn't clear to me. This is what I've tried
var objects = [
{name: 'Jhon'},
{name: 'Jack'},
{name: 'Maria'}
];
```
Antonio De Rose
20,885 Pointsit is not a javascript error, but the error against your question, as it asks 2 properties each object.