function getSomething() {
return "something";
}
async
function testAsync() {
return Promise.resolve("hello async");
}
async
function test() {
const v1 = await getSomething();
const v2 = await testAsync();
console.log(v1, v2); //something 和 hello async
}
test();
最近发布的代码:
最多阅读的代码