The truth … I feel a little stand with this problem
foo(function(err, a){
foo.buu(function(err, b){
d = x(b);
});
});
Considering that the structure can not be modified. How do I access the variable d?
Considering … question really did not know that my problem is this.
var db = new Db(database, server);
db.open(function(err, db){
list = new Array();
db.collectionNames(function(err, collections){
collections.map(function (coll){
list.push( coll.name ) );
});
});
but when making a console.log(list); returns only [] . I have no idea why?
The variable
das you have it in your code, assuming that it’s the whole code, will be attached towindow.So accessing it can be done by just
d.