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 Foundations Variables Hoisting

"Hoisting" challenge question

I am not sure what I am doing wrong according to the challenge question to alter the function elevatorCloseButton for best practices for variables within a scope. What am I doing wrong?

My code looks like this

    function elevatorCloseButton(pushed) {
    var status = "I'll close when I'm ready.";
        if (pushed) {




3 Answers

Does this challenge work for you? I keep receiving errors such as "There was a problem connecting to Code Challenge : TImeout Error"

I do not get the timeout error.

Steve Leichman
Steve Leichman
7,008 Points

Michealann, did you ever get this resolved? I'm stuck on the same problem.