Stuck on Functional Scope, exercise 2/4


#1


I have copied my code and my answer. I dont know whats missing or whats incorrect, but I cant move forward to the next exercise. Help appreciated!


MY CODE:
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();


MY ANSWER:
Mail box: Box 3, Laundry:In-unit


#2

My code:

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('Laundry: ' + laundryRoom +  ', Mail: ' + mailRoom);

#3

Thank you for your help!
Unfortunately, I still cant proceed to the next question.


#4

No worries, I managed to solve it!


#5

I'm having trouble on number 5 of functional scope exercise 2/4, any tips?


#6

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