function authenticateUser(un, pwd){
  users.find({username: un}).toArray((err, items) => {
    try{
      bcrypt.compare(pwd, items[0].password, function(err, result) {
      // i want to return this result
    });}catch (error){
      console.log("")
      // in this case i want to return false
    }
  })
}
How can I return data from this nested function?
 
     
    