I'm having a hard time understanding async / await. How can I make the test() function wait to run the rest of the code until the helper() function is finished?
Thank you!
async function test() {
await helper();
console.log("world");
}
function helper() {
setTimeout(() => {
console.log("hello");
}, 3000);
}