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

General Discussion

arrays, what is the syntax error parsing mean here.

var mixture={'ab', 'abc', 'abcd', 60, 70, me};

2 Answers

Hey Marc,

An array's values are stored within square brackets, not curly braces.

Like this:

var mixture = ['ab', 'abc', 'abcd', 60, 70, me];
Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Hi marc ohlsson

Like Kevin Kenger says -- you use [ ] to create an array, or list, of values in JavaScript. You use the curly braces { } to create an "object" or collection of properties with names and values:

var person = {
 name : "Dave",
 job : "Teacher at Treehouse"
}

You can access the properties of an object using "dot notation" like this:

person.name
person.job