I just added the index variable outside of the method and then called it inside the method. The attachment to the password variable is of course shorter and eliminates the need for a variable.
2 Likes
Very good clean code!