A loop will execute as long as its condition remains true, but you can stop it manually using the break keyword. For example:
var peopleArray = ["John", "Nicole", "Thomas", "Richard", "Brian", "Novak", "Vick", "Amanda",...