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 trialluckius kajoka
1,695 Pointscan i get help hare, why this is not correct?
help me please
var objects = [
{
object: 'sale?',
answer: 10
}
{
object: 'roja',
ansewer: 20
}
{
object: 'rai',
answer: 30
}
];
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Objects</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
1 Answer
Ross King
20,704 Pointsluckius kajoka Again really close, you're almost there.
You are missing the commas between each object which is throwing an error in your array.
var objects = [
{
object: 'sale?',
answer: 10
}, // added comma
{
object: 'roja',
ansewer: 20
}, // added comma
{
object: 'rai',
answer: 30
}
];
luckius kajoka
1,695 Pointsluckius kajoka
1,695 Pointshi Ross i did aded comma there but still ,it seem there is a problem can you help me again to check it?
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsHi luckius kajoka
Once the commas are added the code does pass. Double check your code against the code Ross provided above. I did verify that the code does pass both Tasks in the Challenge.
:)