分类: Web开发
2013-06-02 00:05:59
58 /home/taohx/scripts/study/nodejs
结果:
node util_demo.js
DEBUG: message on stderr
1 Jun 23:44:59 - message on stderr
{ [Function]
[name]: '',
[length]: 2,
[caller]: null,
[prototype]: { [constructor]: [Circular] },
[arguments]: null }
true
true
Received data: "It works!"
示例2:
结果:
node util_demo1.js
DEBUG: message on stderr
2 Jun 00:04:14 - message on stderr
base
Hello base
{ name: 'base', base: 1991, sayHello: [Function] }
{ name: 'base', base: 1991, sayHello: [Function] }
{ name: 'base',
sayHello:
{ [Function]
[name]: '',
[length]: 0,
[caller]: [Getter/Setter],
[prototype]: { [constructor]: [Circular] },
[arguments]: [Getter/Setter] },
base: 1991 }
sub
{ name: 'sub' }