title: How can we use inner variable from function calling in node js at outside?
body: <pre><code>var limit = 0;
  
  Settings.find({ settings: "settings" }, function (err, docs) {
      limit=docs[0].keywords;  //6
      console.log('Limit from Inner : ' + limit);
  });
  
  console.log('Limit from Out : ' + limit);
  </code></pre>
  
  <p>It will give me output like :
  "Limit from Out : 0
  Limit from Inner : 6"</p>
  
  <p>I want call inner first and out put like :
  "Limit from Out : 6
  Limit from Inner : 6"</p>