You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

8 lines
201 B

function f (x) { return new Promise(resolve => {
process.nextTick(() => { resolve(x) }) }) }
async function add (x) {
return x + await f(20) + await f(30)
}
add(10).then(v => { console.log(v) })