Skip to content

Instantly share code, notes, and snippets.

@emilwidlund
Created April 18, 2018 10:48
Show Gist options
  • Select an option

  • Save emilwidlund/e20133567aadbffaa22930a3fe4037f9 to your computer and use it in GitHub Desktop.

Select an option

Save emilwidlund/e20133567aadbffaa22930a3fe4037f9 to your computer and use it in GitHub Desktop.
myPromise = new Promise (resolve, reject) ->
Utils.delay 3, () ->
print 'Function Executed after 3 seconds!'
resolve()
myPromise.then () ->
print 'This will be printed as soon as the promise executes the resolve-function'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment