Skip to content

Instantly share code, notes, and snippets.

@romain130492
Last active February 24, 2020 14:23
Show Gist options
  • Save romain130492/4ed9461846288e4a0a9f1710079b38a2 to your computer and use it in GitHub Desktop.
Save romain130492/4ed9461846288e4a0a9f1710079b38a2 to your computer and use it in GitHub Desktop.
Async Function
init(){
that =this;
async function run() {
await that.createIsoFromCurrentDay()
await that.checkIfEvent()
await that.getOlderEvent()
await that.orderEventsByTime()
}
run()
}
Shorter Version :
async init() {
await this.createIsoFromCurrentDay()
await this.checkIfEvent()
await this.getOlderEvent()
await this.orderEventsByTime()
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment