Export variables within callback functions || Re-edit
<p>The truth ... I feel a little stand with this problem</p>

<pre><code>foo(function(err, a){
    foo.buu(function(err, b){
    d = x(b);
    });
});
</code></pre>

<p>Considering that the structure can not be modified. How do I access the variable <code>d</code>?</p>

<p>Considering ... question really did not know that my problem is this.</p>

<pre><code>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 ) );
    });
});
</code></pre>

<p>but when making a <code>console.log(list);</code> returns only <code>[]</code> . I have no idea why?</p>
