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 trialArthur Kakulidis
2,657 PointsI am getting this question wrong even though I looked into the video many times. Can someone please help.
The hint is saying that task 1 is no longer passing
var objects = [
{name: "Bob"
age: 14},
{name: "Sally"
age: 15},
{name: "Phil"
age: 13},
]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Objects</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
3 Answers
Connor Walker
17,985 PointsYour code is almost correct, you are just missing the commas in between the values inside each object and the semi colon at the end of the array, like this:
var objects = [
{name: "Bob",
age: 14},
{name: "Sally",
age: 15},
{name: "Phil",
age: 13},
];
Shane Oliver
19,977 PointsYou will need to separate you key value pairs in your objects with commas
var objects = [
{name: "Bob",
age: 14},
{name: "Sally",
age: 15},
{name: "Phil",
age: 13},
]
Arthur Kakulidis
2,657 PointsOhhh. Ok I see it now! Thank you so much.