TL; DR-again; CoffeeScript author just told me I'm right : Do not use _i.
14:29 <jashkenas> You shouldn't use internal variables.
...
14:42 <meagar> I was hoping something more deeply involved in the language would be able to put some authority behind that opinion
14:43 <meagar> ... I was basically hoping for an authoritative "don't do that"
14:44 <jashkenas> you just got it ;)
14:44 <jashkenas> for item, index in list -- there your reference to the index.
TL;DR; , . , .
" " ; :
for x in [1, 2, 3] when _i % 2 == 0
console.log "#{_i} -> #{x}"
for x,i in [1, 2, 3] when i % 2 == 0
console.log "#{i} -> #{x}"
, NaN?
; undefined. , _i , JavaScript.
_i, , _i . , . _i, ; _j _k ..
, , JavaSript. , for value,key in array:
array = ['a', 'b', 'c']
console.log(index) for item, index in array
, :
feast = (cats) -> eat cat for cat, index in cats when index % 2 == 0