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 trialSonja Tomcic
6,590 PointsHelp. I don't know how to do this
i've tried, but it says task one is no longer passing
var objects=[
];
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Objects</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! I really wish I knew what you'd tried that's failing. But likely as not, you had a typo somewhere. When it says task 1 is no longer passing it means that you've introduced a syntax error into your previously working code. Here's what I did:
var objects=[
{
name: "Jennifer",
course: "C#"
},
{
name: "Steven",
course: "JavaScript"
},
{
name: "Kevin",
course: "CSS"
}
];
Hope this helps!
Sonja Tomcic
6,590 PointsSonja Tomcic
6,590 PointsThanks, i didn't put quotation marks. That was the problem
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherSonja Tomcic ah ha! That'll do it, assuming the value is a string. However, if you'd had a key pair like this:
then the points wouldn't need quotations as it would be an integer.