MORSE Corp Interview Question

How to perform a simple for loop