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 Data Relationships with SQL and Sequelize Create Related Data Using Sequelize Models Populate the Database with Seed Data

MARTIN CLASON
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
MARTIN CLASON
Full Stack JavaScript Techdegree Graduate 19,730 Points

Global Variables Error

In the code it gives this example: [bradBird, vinDiesel, eliMarienthal, craigTNelson, hollyHunter] = peopleInstances; Which results in an error.

So I went to the final code and found that is changed to: let [ bradBird, vinDiesel, eliMarienthal, craigTNelson, hollyHunter ] = peopleInstances; Which works.

Is that a mistake?

1 Answer

I'm not sure why you are getting an error. All the actor variable have been defined with LET so the array destructing assignment should be valid. In the final code, are the actor names still declared at the top of the code.