current_name = prompt("Enter a name"); first_alpha = current_name; //he's first at this point while (current_name != "DONE") { if (current_name < first_alpha) first_alpha = current_name; current_name = prompt("Enter a name"); } alert("The name occurring first is " + first_alpha);