单项选择题
A.Promise {[[PromiseStatus]]: "resolved", [[PromiseValue]]: "hello async"} ;
B.hello async
C.hello asyncPromise {[[PromiseStatus]]: "resolved", [[PromiseValue]]: undefined}
D.报错
单项选择题 async function print(){ return 1;}print().then(e => console.log(e)); 输出()
单项选择题 async function t(){ var a = new Promise( function (resolve, reject) { console.log(1); resolve(9); console.log(2); }) var b = new Promise( function (resolve, reject) { console.log(3); resolve(8); console.log(4); }) console.log(5); b=await b; a=await a; console.log(b); console.log(a); console.log(6);}t();console.log(7);//代码打印结果是什么?()
判断题 await语句后面的Promise对象变为reject状态,那么await前面有没有return执行效果是一样的。