Below is pseudo-code for the way you write a listener for a Realtime Database event.
function callbackA(snapshot) {
console.log(snapshot.val());
}
route.on('value', callbackA);
Now imagine I want to pass some arguments to callbackA so that callbackA might look like this:
function callbackA(snapshot, myParam1, myParam2) {
console.log(snapshot.val());
console.log(myParam1);
console.log(myParam2);
}
How can I do this (without ruining the first arg that firebase automatically provides for us)?