Test is async/await works
JavaScript
testAsync()
async function testAsync() {
console.log('a')
await(timer())
console.log('c')
}
async function timer() {
setTimeout(() => console.log('b'), 500)
}
testAsync()
async function testAsync() {
console.log('a')
await(timer())
console.log('c')
}
async function timer() {
setTimeout(() => console.log('b'), 500)
}