Get a value from firebase
<p>I want to get a value outside of a function in firebase to use globally, but it is not working.</p>

<pre><code>var ref = new Firebase("https://xxxxx.firebaseio.com/users/xxxx/roles/admin/"); // true or false

    ref.once("value", function(snapshot) {
    console.log("here");
    console.log(snapshot.val());
    var isAdmin = snapshot.val();
    return isAdmin;
});

console.log(isAdmin); /// cannot get value
</code></pre>