(This is from a REPL session in browser console, so time passes between each line)
var ref = new Firebase('url/to/string/value');
ref.set('hello');
ref.on('value', function(snap) { console.log(snap.exportVal());});
// => "hello" is logged to the console
ref.setPriority(100);
// => {'.value': 'hello', '.priority': 100} is logged to the console
Firebase behaves as follows
(This is from a REPL session in browser console, so time passes between each line)