Answer by alex for Using local and global variables properly in node.js
Am I getting this theory right?No. Your "_global" variable is just a local variable in the upper scope.Anyway, the rule of thumb is: unless you have a good reason to do otherwise, always use local...
View ArticleAnswer by BENZ.404 for Using local and global variables properly in node.js
No need for a http server or ajax. All that needs to be done is like this:var wss=new WebSocketServer({host:port});//-----global for everyonewss.on('connection',function(soc){ var...
View ArticleUsing local and global variables properly in node.js
I am getting closer I think to understanding how global and local objects work in node.js but I am getting tripped up when it comes to something more complex like a server.In my understanding in...
View Article
More Pages to Explore .....