Move `var` declaration into `for ()`

For coding style consistency. Also saves some bytes.