3 ms·
If otherThings is unrelated, you could also do this: var username = getUsername(); var resultSent = username.then(username => res.send("Hi "+username")
by spion 11y ago
If otherThings is unrelated, you could also do this:
var username = getUsername();
var resultSent = username.then(username => res.send("Hi "+username"))
var otherThings = doOtherThings()
return Promise.all([resultSent, otherThings])