From time to time I do the same error when trying to export some variable from whatever kind of JavaScript module: function createStudent(aName) { var name = aName; function setName(aName) { name = aName; } function getName(aName) { return name; } return { name: name, setName: setName, getName: getName }; } var s = createStudent(“Alexander”);…Continue Reading “Exporting a variable from JavaScript module”