title: Fetching last record from mongodb using node.js
body: <p>I am trying to fetch last record from mongodb database using node.js.
  I found some answer from <a href="https://stackoverflow.com/questions/20294626/select-last-n-records-from-mongodb-using-node-js">here</a>.
  Now i have given query like </p>
  
  <pre><code>Videopost.find({}).sort({_id:-1}).limit(10,function(err,docs){}
  </code></pre>
  
  <p>Trying to print docs in console but couldn't get any value in docs.</p>