Is it actually as simple as:
function myClass() { this.nextPresident = "Bozo the clown"; } myClass.prototype.add = function(a,b) { return a+b; }; myClass.prototype.getNextPresident = function() { return this.nextPresident; }; exports myClass; // <------- Not valid JS?
You actually want exports = myClass?
exports = myClass
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Is it actually as simple as:
You actually want
exports = myClass
?