Greg Chu Technical History
Wednesday, February 24, 2016
exports returns an object to require
exports return to require as an object
console.log('Hello world');
var x = 1;
var y = 2;
console.log(x * y);
var msg = require("./msgs.js");
console.log(msg.first);
msgs.js
exports.first = "first"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment