Fix typo in code sample

Replaced `i + 2` with `i += 2`, since the former will not actually
modify `i` and thus will be useless in a for loop.