Module.exports, objects


#1

How does this code work?

let Menu = {};

module.exports = {
  specialty: "Roasted Beet Burger with Mint Sauce",
  getSpecialty: function() {
    return this.specialty;
  } 
};

Some file:

const Menu = require('./ifyouseme,hi.js');

console.log(Menu.getSpecialty());

How do specialty and getSpecialty get assigned to Menu?


#2

Please post a link to the exercise. Thanks.