I am new to backend dev. I am trying to check if there is already an existing user in the collection and console log 'no' if there is none. I do not have the indicated data in 'const b' but instead of 'no' I keep getting empty array in terminal.
const b = {email: "[email protected]", password: "wwww"}
MyModel.find(b)
.then(exUs =>{
if(exUs){
console.log(exUs)
} else {
console.log("no")
}
})