r/programming • • Jul 25 '13

CoffeeScript's Scoping is Madness

http://donatstudios.com/CoffeeScript-Madness
210 Upvotes

315 comments sorted by

View all comments

Show parent comment

0

u/dschooh Jul 25 '13

You have to be careful when using jQuery. How many items will the code iterate over?

x = false
# [...]
$(".some-item").each ->
    do_something_with $(this)
    another_thing = x