Question

Declan is creating a web page and wants a pop-up box to appear to ask the user to enter their name. How can this be accomplished?

(1 point)
Responses

by using a prompt function in CSS

by using a prompt function in CSS

by using a prompt function in HTML

by using a prompt function in HTML

by using a prompt function in JavaScript

by using a prompt function in JavaScript

by using a prompt function in Python

1 answer

The correct response is:

by using a prompt function in JavaScript

JavaScript includes a built-in prompt() function that can be used to display a dialog box prompting the user for input.