You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take a look at "myObject" and "pers"
Why we can not print out the value of "myObject" when it is out side "exec" function. The value of myObject when it out side is "undefined"
Thank so much!
The text was updated successfully, but these errors were encountered:
This is a problem in your code logic and callbacks. For all of the console.log calls other than the one directly after myObject is set, they will get called before anything is actually set.
So what should I do if I want do something on return data (likely combine with other data) before responding it to client. Do I need some delay time before get it?
generally, you do what you need to within the callback function. You could theoretically use a time delay, but that is not a good way to do it and unreliable.
Take a look at "myObject" and "pers"
Why we can not print out the value of "myObject" when it is out side "exec" function. The value of myObject when it out side is "undefined"
Thank so much!
The text was updated successfully, but these errors were encountered: