title: How to 'chain' JS function after the first is fully done
body: <p>I have a functions which should run one AFTER the other, such:</p>
  
  <pre><code>function cutTomatoesAlone(Kg){
      // slice my stuff
  }
  function cookTomatoes(Minutes){
      // boil my stuff
  }
  </code></pre>
  
  <p>I call them such:</p>
  
  <pre><code>cutTomatoesAlone(15) // 15kg, need 3 hours!
  cookTomatoes(10); // need 10 minutes
  </code></pre>
  
  <p>But the cookTomatoes(10) finish before my cutTomatoesAlone(15). </p>
  
  <p><strong>How to run  <code>cutTomatoesAlone(15)</code> first and when finished, then run <code>cookTomatoes(10)</code> ?</strong></p>
  
  <hr>
  
  <p><strong>Edit:</strong> <code>cutTomatoesAlone()</code> load an external JSON. <code>cookTomatoes(10)</code> work on it.</p>