Skip to content

Instantly share code, notes, and snippets.

@cray0000
Last active August 29, 2015 14:08
Show Gist options
  • Save cray0000/dfd652b49c7dd1c41c3b to your computer and use it in GitHub Desktop.
Save cray0000/dfd652b49c7dd1c41c3b to your computer and use it in GitHub Desktop.
# Tell the order of outputs into the console.
# window.pingAJAX() is asyncronous function that takes ~10 sec to execute
draw = (cb) ->
b = 10
console.log 'A'
a = b + 15
window.pingAJAX ->
c = 531
console.log 'B'
d = c - 15
cb()
init = ->
draw ->
x = 5
y = x * 10
console.log 'C'
z = y
e = 15
console.log 'D'
f = e * e
init()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment