var coll= '';
    function test(callback){
        MongoClient.connect(url, function(err, db) {
          if(err) throw err;
          coll=db
          callback(coll);
        });
    }
    test();
    console.log(coll)
This is my code. When i print 'coll' variable it says undefined. How to access a variable from the outside of callback. Currently getting error callback is not a function
 
    