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?

user308
1#
user308 Published in April 25, 2018, 12:26 pm

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.301132 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO