Node.js學習筆記--引用模塊、npm

1.引用模塊:使用exports javascript     (1)引用函數或者變量 exports.msg=msg;html     引用foo.js中的變量和函數: java var foo=require("./test/foo.js");//在使用中只須要require一次 console.log(foo.msg); foo.showName();    foo.js: var msg=
相關文章
相關標籤/搜索