• As i understand it, the connect function has to return a new object like this:

    exports.connect = function(arg) {

    return new Date(arg);
    

    };
    var Date=function(arg) {
    this.value=arg;

    console.log('Its alle about Date: '+this.value);
    

    };

    Then you are able to create it like this:

    var d1=require('date').connect('Object_1');
    var d2=require('date').connect('Object_2');

    your output should be like this:

    Its alle about Date: Object_1
    Its alle about Date: Object_2

    Sacha

About

Avatar for Sacha @Sacha started