title: Is setTimeout a good solution to do async functions with javascript?
body: <p>Searching in the web about async functions, I found many articles using setTimeout to do this work:</p>
  
  <pre><code>window.setTimeout(function() {
     console.log("second");
  }, 0);
  console.log("first");
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>first
  second
  </code></pre>
  
  <p>This works, but is a best practice?</p>