Skip to content

Using tamejs with CoffeeScript

maxtaco edited this page Jul 25, 2011 · 2 revisions

CoffeeScript allows Embedded Javascript, so you can use tamejs like this:

for x in [1...10]
  `await {` ; setTimeout defer (), 100; `}`
  console.log 'hello ' + x

To see the generated code, checkout: https://gist.github.com/1098605

CoffeeScript had a discussion about including a similar concept (defer) but it didn't go through. Part III of a very long discussion can be seen here

Clone this wiki locally