GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — JavaScriptStudy/17-nodejs/05-hello.js at master · LCLucky/JavaScriptStudy Expand file tree/ Copy path05-hello.jsMore file actions 21 lines (20 loc) · 386 Bytes / Copy path05-hello.jsFile metadata and controls21 lines (20 loc) · 386 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 // exports 方式1 // 导出 exports 对象 exports.world = function() { console.log('Hello World'); } // exports 方式2 // 导出目的对象( 如 Hello ) module.exports = function() { // ... } function Hello() { var name; this.setName = function(thyName) { name = thyName; }; this.sayHello = function() { console.log('Hello ' + name); }; }; module.exports = Hello; |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |