I am having trouble with 'Learn Javascript-2. Functional Scope Question 5'


Hi everyone
I am having trouble with the Learning Javascript No.2 Functional Scope Question 5.
Please Help...
(I got through no.4)

My Code Was...

var laundryRoom = 'Basement',mailRoom = 'Room 1A';
function myApartment(){
var mailBoxNumber = 'Box3';
laundryRoom = 'In-unit';
console.log(' Mail: ' + mailBoxNumber + ',Laundry: ' + laundryRoom );

console.log('Laundry: ' + laundryRoom + ', Mail: ' + mailRoom);

Please Help


honestly I don't know what's really happening with this Course. I too like you am stuck.


Yes me too, I am Baffled I SAY! BAFFLED!


Can Anyone Help Us Please?


Honestly I hope help comes soon enough :pensive:


Hey, You started a day after me :slight_smile: :slight_smile:


That's Nice! And Interesting!


Have you gotten past that exercise :slight_smile:


Read instruction once more:

Nothing showed up in the console! That's right, and it means that JavaScript does not have access to the variable, since it is hidden away in the myApartment function.

It means that you don't have access to variable mailBoxNumber because this variable exist inside the function myApartment();. So, you need delete the console.log on mailBoxNumber, and call the myApartment function instead:

console.log(mailBoxNumber); // delete this line and put:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.