Q: mongo explain function in javascript How can I get my javascript code to receive the explain execution stats results to be stored / displayed to my javascript code?  My ultimate goal is to store the executionTimeMillis in a variable.
I know I can go into the mongo cli - and execute db.collection.find().explain() - I get the results there... but how do I get javascript to store those results?  I am using mongoose currently 
 / can't figure it out.
in my .js code - if I execute 
db.collection('collectionName').explain().find({id: 1}, (err, doc) => {
    console.log('explainresults', doc);
  });

I get TypeError: db.collection(...).explain is not a function

A: Use explain after find
db.collection.find().explain()

