I declare user_properties
outside of my function. I then get my data from firebase and try to store it in user_properties but it ends up being undefined.
Does anyone know what I am doing wrong here?
var user_properties;
get_user_properties = new Firebase("https://<MY-URL>/users/"+auth.uid+"/properties");
get_user_properties.once('value', function (dataSnapshot) {
user_properties = dataSnapshot.val();
});
//undefined
console.log(user_properties);