Functional Scope - step 2

Stucked on step 4, need help

https://www.codecademy.com/en/courses/learn-javascript/lessons/scope/exercises/functional-scope

Please, post your code and describe the problem.

The program won\t let me go on step 5, I don’t know why ?!

var laundryRoom = ‘Basement’;
var mailRoom = ‘Room 1A’;

var myApartment = function() {
var mailBoxNumber = ‘Box 3’;
var laundryRoom = ‘In-unit’;
console.log('Mail box: ’ + mailBoxNumber + ‘, Laundry:’ + laundryRoom);
};

myApartment();
console.log(mailBoxNumber);

You need to add console.log(mailBoxNumber); after myApartment();:

var laundryRoom = 'Basement';
var mailRoom = 'Room 1A';

function myApartment() {
  var mailBoxNumber = 'Box 3';
  laundryRoom = 'In-unit';
  console.log('Mail box: ' + mailBoxNumber + ', Laundry:' + laundryRoom);
}

myApartment();
console.log(mailBoxNumber);

Thanks for Your effort, but I’ve already tried it for many times, and still nothing, maybe it’s a bug on web

Could you post error msg or screen after you added

myApartment();
console.log(mailBoxNumber);

Something happened, I’ve just passed into level 3, thank You for your effort

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