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 trialDanielle Bardgette
806 PointsWorking on JS - Hoisting module
Here are the instructions --> Alter the 'elevatorCloseButton' function to follow the best practices in declaring variables within the scope of the function.
Here's the code I wrote --> http://collabedit.com/46ca4
Here's what it's telling me ---> You should assign the 'status' in the if statement.
Any thoughts on what I'm doing wrong?
5 Answers
Danielle Bardgette
806 PointsAny thoughts on what I'm doing wrong?
Danielle Bardgette
806 PointsBlah I'm having trouble adding the code I wrote.
Danielle Bardgette
806 Pointstrying again
Gustavo Suarez
4,053 PointsTry just initiating the variable, but not assigning it a value. I've edited your example http://collabedit.com/46ca4
Danielle Bardgette
806 PointsAwesome! Thanks Gustavo. That did the trick.