I'm looking for some guidance on how to save a string or object to the Firebase database using JavaScript. I'm currently trying to do this on codepen.io. Here's what I've attempted so far:
// Setting up Firebase app
const firebaseConfig = {
// Your app configuration goes here
};
firebase.initializeApp(firebaseConfig);
// Accessing the database
const database = firebase.database();
// Adding a string to the database
const myString = "Hello, Firebase!";
database.ref('myData').set(myString);
However, I'm not seeing any new data in the Firebase console. What steps am I missing? Any help would be appreciated.