sms_code(userInfo).then(function(data){ return res.json(data); }) .then(function(data){ return res.json(data); }) .catch(next);
Why
catch(function(err){ next(err) })
can be abbreviated to
.catch(next);
走同样的路,发现不同的人生
equals
catch(next) function next(err){ }
Do you think it’s okay?
setTimeout(function(){ doSomeSth() },1000) setTimeout(doSomeSth,1000);
equals
Do you think it’s okay?