This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pushSomething(ref) { | |
// Let's push something. push() returns a reference that you can hold onto! | |
var justPushed = ref.push({test: "push"}); | |
// We return a reference, but you can also return the name of the newly | |
// created object with .name(). | |
return justPushed; | |
} | |
function removeItem(ref) { | |
// Now we can get back to that item we just pushed via .child(). |