Can Someone Explain Why This Counter Isn't Counting?

Greetings,

This is from the Coded Correspondence challenge.

I put in a counter so that to “keyword” would not skip places when mapping to the message, but it doesn’t seem to count?

Any help would be greatly appreciated, thanks.

Hey and welcome to the forums!

You are currently setting the value of counter to 0 inside the loop. This means that every time it comes back to the beginning of the loop, it is reset back to 0. You need to set the value to 0 before the loop starts to ensure that the increment works correctly.

1 Like

Aha!

Thank you, Adam!

1 Like