PHP
·
发表于 5年以前
·
阅读量:8390
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();