I have the following function in JS which is supposed to read all the entries in a firebase database.
async function getMarket() {
let marketRef = db.ref('/market');
let snapshot = await marketRef.once('value');
return snapshot.val();
}
For some reason when I call this function it returns Promise { <state>: "pending" }
. Why is this happening?