async function test1() { return 1}async function test2() { return Promise.resolve(2)}const result1 = test1()const result2 = test2()console.log(result1);console.log(result2);
async function test3() { const p3 = Promise.resolve(3); p3.then(res => { console.log("data3", res); }) const data3 = await p3 console.log("data3", data3);}test3()async function test4() { const data4 = await 4 console.log("data4", data4);}test4()
async function test5() { const data5 = await test1() console.log("data5", data5);}test5()async function test6() { const p6 = Promise.reject(6) try {
const data6 = await p6 console.log("data6", data6); } catch (e) { console.log("err", e); }}test6()