title: javascript Asynchronous: Cannot read property 'then' of undefined
body: <p>I'm trying to trigger 3 functions one after another. When each completes, next starts my code :-</p>
  
  <pre><code>getInfo(f1 , f2).then(function() {
      setInfo().then(function(callback) {
          Three();
      });
  });
  </code></pre>
  
  <p>i get this error :-</p>
  
  <pre><code>&gt;TypeError: Cannot read property 'then' of undefined
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <pre><code>function setInfo(){  
  
      alert('done')   
  
    } 
  </code></pre>