0

Can someone explain what I'm doing wrong here? Thank you.

Example:

let _result;
await function(req.body, (err, res) => {
  if (err) throw err
  console.log(res) // some value 
  _result = res
})
console.log(_result) // undefined
Bev01
  • 1

0 Answers0