title: How to delete/remove nodes on Firebase
body: <p>I'm using Firebase for a web app. It's written in plain Javascript using no external libraries.</p>
  
  <p>I can "push" and retrieve data with '.on("child_added")', but '.remove()' does not work the way it says it should. According to the API,</p>
  
  <blockquote>
    <p>"Firebase.remove() - 
    Remove the data at this Firebase location. Any data at child locations will also be deleted.
    The effect of the delete will be visible immediately."</p>
  </blockquote>
  
  <p>However, the remove is not occurring immediately; only when the entire script is done running. I need to remove and then use the cleared tree immediately after.</p>
  
  <p>Example code:</p>
  
  <pre><code>ref = new Firebase("myfirebase.com") //works
  ref.push({key:val}) //works
  
  ref.on('child_added', function(snapshot){
  //do stuff
  }); //works
  
  ref.remove()
  //does not remove until the entire script/page is done
  </code></pre>
  
  <p>There is a similar post <a href="https://stackoverflow.com/questions/22425889/unable-to-remove-element-and-children-in-firebase">here</a> but I am not using Ember libraries, and even so it seems like a workaround for what should be as simple as the API explains it to be.</p>