async function main() {
await new Promise(res => setTimeout(res, 1000))
console.log(Math.random() < 0.5 ? 'Hi!' : 'Bye!')
}
main().catch(console.error)