Artificial intelligent assistant

jQuery Deferredでthenが処理を待ってくれない Deferreddelay delay = (msg)-> $.Deferred (p)-> setTimeout -> console.log msg p.resolve() ,1000 #delay('test').done -> # delay('test2').done -> # delay('test3').done -> #delay('start') #.then ->delay(1) #.then ->delay(2) #.then ->delay(3) #$.Deferred().resolve() #.then ->delay(1) #.then ->delay(2) #.then ->delay(3) d = new $.Deferred() d.then ->delay(1) d.then ->delay(2) d.then ->delay(3) d.resolve() <

$.Deferred().resolve()
.then ->delay(1)
.then ->delay(2)
.then ->delay(3)


`then()` Deferred `then()`


d = $.Deferred().resolve()
d = d.then ->delay(1)
d = d.then ->delay(2)
d = d.then ->delay(3)





d1 = $.Deferred()

d = d1.then -> delay(1)
d = d.then -> delay(2)
d.then -> delay(3)

d1.resolve()


<

`$.Deferred()` new `resolve()` Deferred `d1`

then Deferred `resolve()` `reject()` `promise()` Promise

jQuery.Deferred - Yahoo! JAPAN Tech Blog

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b5589dc3786e8d3e9c2f49e892425c09