'for' looping problem

Hm? The [] has nothing to do with the code error. Why the error?