title: how to do javascript callbacks and stop async - easy example
body: <p>I'm trying to wrap my head around javascript callbacks and having a hard time.
  I have this bit of simple code:  How can I make the fertilizer function wait for the water function to finish before it executes using a callback?</p>
  
  <pre><code>function plant() {
      console.log("Plant maize"); 
  }
  
  function water() {
      setTimeout(function() {
          console.log("Water plant")
        },3000);
  }
  
  function fertilizer() {
      console.log("Add fertilizer");
  }
  
  plant();
  water();
  fertilizer();  
  </code></pre>