title: execute function after another
body: <p>I have this javascript code:</p>
  
  <pre><code> if (direction !== "leftnav") { 
  // DO THINGS
  };
  setTimeout(function () {
  //DO OTHER THINGS AFTER THE FIRST THING
  }, 1000);
  </code></pre>
  
  <p>Is it possible to execute the 2e function after the first instead of having to use a timeout event?</p>
  
  <p>thanks for your help!</p>