Quantcast
Channel: Using local and global variables properly in node.js - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article



Answer 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 Article

Using 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
Browsing latest articles
Browse All 3 View Live




Latest Images