Reputation: 5173
I have been using something like :
n = 50
force.tick() for i in [0...n]
but I am trying to find a way to do multiple statments with 50 times as able
n = 50
force.tick()
doSomthing1
doSomething2
for i in [0...n]
This obviously does not work, Is there a way to do somethign simliar this above query in coffeescript ?
Upvotes: 1
Views: 221
Reputation: 664548
Just regular loop syntax instead of a single-line-comprehension:
n = 50
for i in [0...n]
force.tick()
doSomthing1
doSomething2
Upvotes: 4