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 JavaScript Loops, Arrays and Objects Tracking Data Using Objects Mixing and Matching Arrays and Objects

Farid Lavizadeh
Farid Lavizadeh
12,006 Points

Why are there no names assigned to the objects here?

Aren't objects type of variables that need to be named?

2 Answers

Hi Farid,

The variable used in the video is questions, which is an array with objects as elements. These objects don't need their own name, because they are being contained within the variable questions.

Otherwise, if each object were on its own, you would be correct and they would need their own variable name.

Farid Lavizadeh
Farid Lavizadeh
12,006 Points

Thank you Robert. Makes sense now.