firebase javascript edit code example
Example 1: javascript write to firebase
function writeUserData(userId, name, email, imageUrl) {
firebase.database().ref('users/' + userId).set({
username: name,
email: email,
profile_picture : imageUrl
});
}
Example 2: write firebase data using variables javascript
foo = {};
foo[variable] = 'more stuff';
fb.set(foo);