Pergunta de entrevista da empresa American Express

Explain why for loop output is 3 instead of 4.