2006年 12月 18日

ループ変数 i の意味

歴史なんてどうでもいい。

for (var i = 0; i < foo.length; i++) {
    // hoge
}

i -> index

foo.each do |i|
    # hoge
end

i -> item