JavaScript - How to run these two firebase functions synchronously?

I want to run the below two firebase JS functions in sync since I need the values from both of these in the last if block to perform an operation. I have console.log(1), (2) and (3) to see if they are working in sync but they don't. I tried the .then() on the first block but that didn't work. Can someone help here? I am guessing promise might work here but I do not know how to implement that


In Progress 31-10-2019 Mohsin Ali 702

Please briefly explain why you feel this question should be reported .

Answers (0)

Leave An Answer

app logo

Download Our App!

Enjoy all the features. Browse jobs, articles, questions, scholarships and many more! in just one App