Node.js console.log not working -
simplest possible code in hello.js
(function() { console.log("hello world!"); }); running : $node hello.js
there no output. if remove enclosing function, works properly. want use closure. ideas?
node version 0.10.30. ubuntu 12.04 x64
you,re not running function.
you should add function call:
(function() { console.log("hello world!"); }).call(); or simply
(function() { console.log("hello world!"); })();
Comments
Post a Comment