Continuations in JavaScript
I had heard of the term ‘Continuation’ before, but had only glanced at it and never thought about how it could apply to JavaScript. Fortunately, someone else did the thinking for me. The low-down is that the Continuation Pattern can be used when executing really slow JavaScript algorithms that lock up the browser. By doing a Continuation, you can ‘chunk’ Function algorithms into smaller processes and free up the browser so that the user isn’t stuck waiting 5 seconds for your complex JavaScript algorithm to finish. For a detailed explanation check out Marijn Haverbeke article:

hi i enjoyed the read
Comment by Kyla — August 18, 2007 @ 6:20 pm
Looks good, but for me it’s too confusing.
I like putting function into another function, say, nested scopes.
Sometimes when I create a sortable table where user can click on the header to sort it, I like to use setTimeout when the function is rearranging the table rows. In fact, using setTimeout when sorting a table gives me a cool animation effect also. I love JavaScript animation!
Comment by the DtTvB — August 24, 2007 @ 4:54 am