initialize `digit` in `for` statement