Is the below behavior expected for nodejs? It looks buggy to me. If not what am I missing?
A missing semicolon is the cause of your issues.
var abc = function(){ console.log("hello"); }; // missing semicolon! (function(){ console.log("welcome"); })();