for some reason Firebase is returning promise instead of value
let customer123 = db.collection('CustomerDatabase').get().then((snapshot) => {
snapshot.forEach((doc) => {
if(businessNameValue === doc.data().BusinessName){
let customerID = doc.data().CustomerID;
console.log(customerID) // this is fine, i am able to ge the value.
return customerID
}
})
})
console.log(customer123) //but this is giving me promise