单项选择题
async function testAsync1() { console.log(“hello async”);}let result1 = testAsync1();console.log(result1); ()
A.Promise {[[PromiseStatus]]: "resolved", [[PromiseValue]]: "hello async"}
B.hello async
C.hello asyncPromise {[[PromiseStatus]]: "resolved", [[PromiseValue]]: undefined}
D.报错
点击查看答案
相关考题
-
单项选择题
async function testAsync() { return "hello async";}let result = testAsync();console.log(result)输出结果是()
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)); 输出()
A.1
B.报错
C.0
D.undefined -
单项选择题
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);//代码打印结果是什么?()
A.1 2 3 4 5 7 8 6 9
B.1 2 3 4 5 7 8 9 6
C.1 2 3 5 4 7 8 9 6
D.1 2 3 4 5 6 7 8 9
E.9 8 7 6 5 4 3 2 1
