can't understand this.


Could you please explain what exactly you can't understand?


I don’t understand either and will try to explain.

In the lesson we have learned about variables and functions.
But now all of a sudden it says (when code is revealed), on line 4: "var myApartment = function() {"
The combination of variable and function is new.
We were told to put a variable inside of a function (which i did, and in the revealed code it’s on lines 5 and 6). We weren’t told to put a function inside a variable, which is what seems to be happening on line 4.
Apparantly a whole function can be made to be the value of a variable.
But why? And why is this not properly explained?