Stops execution at await

suggest change

If the promise doesn’t return anything, the async task can be completed using await.

try{
    await User.findByIdAndUpdate(user._id, {
        $push: {
            tokens: token
        }
    }).exec()
}catch(e){
    handleError(e)
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Async / Await:
*Stops execution at await

Table Of Contents
41cli
61Async / Await
64ES6