asked 16.6k views
0 votes
Var name = prompt("Enter the name to print on your tee-shirt");

while (name.length > 12) {
name = prompt("Too long. Enter a name with fewer than 12 characters.");
}
alert("The name to be printed is " + name.toUpperCase());

What will happen if the user enters Willy Shakespeare at the first prompt?

a. The user will be prompted to enter a different name
b. The alert will display The name to be printed is " + name.toUpperCase()
c. The alert will display The name to be printed is WILLY SHAKESPEARE
d. The alert will display The name to be printed is WILLY SHAKES

asked
User Plamut
by
8.6k points

1 Answer

4 votes

Willy Shakespeare has 17 characters. It's higher than 12,so the output will be Too long. Enter a name with fewer than 12 characters.

Letter a.

answered
User Binball
by
7.7k points