Home In node how to declare global variable only available for current execution context, not needed in asynchronous callback?
Reply: 0

In node how to declare global variable only available for current execution context, not needed in asynchronous callback?

stupidloser
1#
stupidloser Published in 2017-12-07 07:15:24Z

In node how to declare global variable only available for current execution context, not needed in asynchronous callback?

var obj = 'something'

setTimeout( function(){
// callback context
// i want to get null or undefined value for obj
console.log(obj) 
}, 500);
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.315878 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO