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 trial

JavaScript

Y B
Y B
14,136 Points

An array literal - challenge

I'm stuck on the Javascript array course -'create an array' of objects challenge.
It must either be a very silly error or a bug.

It asks to create an empty array literal called objects., so I've typed:

var objects [];

But it doesn't like it. Any ideas why?

What does a literal mean anyway? Is that an empty string, array etc...?

Thanks.

2 Answers

Rich Donnellan
MOD
Rich Donnellan
Treehouse Moderator 27,671 Points

Y B,

You forgot to assign it! Hint: =

Also, check out the Mozilla Developer Network (MDN) for more information on literals.

–Rich

Y B
Y B
14,136 Points

Oh that's funny - what a wally!

Thanks.