*contents of "sensor1_class.js"*

var Sensor1 = function(){
this.distance = 0;
 getDistance: function (){
return distance;
}

};

module.exports = Sensor1;




*partial contents of "server.js"*

var sensor1 = require('./sensor1_class');

console.log(sensor1.getDistance()); <--- Here is where I am having the 
trouble, I just want to call a method of object "Sensor1" that returns the 
property "distance"


-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to