I want to break out of a forEach loop. Consider this:
db.collection('users').get().then(querySnapshot => {
if (!querySnapshot.empty) {
querySnapshot.forEach(doc => {
let data = doc.data()
if (data.age == 16) {
break //this is not working
}
})
}
}
)
The documentation mentions nothing about breaking out the forEach loop