title: Getting multiple data in multiple functions with callbacks Javascript
body: <p>I want multiple functions that have callbacks and this functions will return data of DB. An example:</p>
  
  <pre><code>getStates: function (callback) {
          try {
              dbExecution.executeQuery("SELECT * FROM Table",
                  function (err) {
                      console.log(err);
                  }, function (rowCount, more, rows) {
                      if (rowCount &gt; 0) {
                          callback(rows);
                      } else {
                          callback(null);
                      }
                  });
          } catch (ex) {
              console.log(ex);
              callback(null);
          }
      }
  </code></pre>
  
  <p>But this function is only one, I have a five functions that do same but get diferent data. The "main" function:</p>
  
  <pre><code>router.get('/content', sessionChecker, function (req, res) {
      Module.getStates(function (data) {
          res.render('info-user', { states: data });
      });
      Module.getReligion(function (data) {
          res.render('info-user', { religions: data });
      });
  });
  </code></pre>
  
  <p>How can I do to call the 5 functions with Asynchronous Javascript (States, City, Religion, etc.) without having nested the functions?</p>