单项选择题
async function f() { return await 123;}f().then(v => console.log(v))打印结果是()
A.123
B.undefined
C.空
D.报错
点击查看答案
相关考题
-
单项选择题
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
