I have a bit of code like
var myClass = function(myArray) {
this.arr = array;
}
myClass.prototype.myMethod = function () {
//random code
};
module.exports = myClass;
When I start node from the console, require this file with var a = require('./myClass.js') and try to instantiate my class with
myclass = new myClass([1,2,3]);
what I get is ReferenceError: myClass is not defined. I am building a very small and easy game, I wonder how I would go about testing it and playing around with it from the node console. Thanks.