localized var i in for loop