I am trying to do something which theoretically should be straightforward but

programA.js:

var app = require(‘./programB’);

var i = app.ABC();


programB.js:

function ABC() {
   return 3;
}

I assumed that the require would read programB.js and cache it. I could then 
refer to it via the variable app and invoked the function. I thought I might 
need to export something but I am not sure what. I am a complete newbie at this 
so am seeking some guidance.

Neale

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to