Welcome to the Treehouse Community
Looking to learn something new?
Marguerite Seip10,762 Points
Hello, I'm having trouble with the Hoisting challenge where I am supposed to declare the variable within the scope of the function. The variable is a string that I declare before the if statement but then I am also supposed to assign it after the if statement? I'm confused. Please help! -Marguerite
Dave McFarlandTreehouse Teacher
You've got it right. You should declare the variable at the top of the function (inside the function). But don't assign a value to it:
Then assign the value
status="I'll close when I'm ready."; inside the