title: Calling setTimeouts by callbacks or promises
body: <p>I have 3 setTimeouts and I need to execute one by one (synchronous manner) by using callbacks or promises below is the my code and output.</p>
  
  <p>Hi I am order 1, Hi I am order 2, Hi I am order 3.</p>
  
  <p>Below is the my code:</p>
  
  <pre><code>             setTimeout(function() {
                    console.log('Hi I am order 1');
                      test2();
                  }, 3000);
  
                    setTimeout(function() {
                    console.log('Hi I am order 2');
                       test3();
                  }, 2000);
  
  
                    setTimeout(function() {
                    console.log('Hi I am order 3');
                  }, 1000);
  </code></pre>