What does the alert() function do in JavaScript?
alert()
Reloads the current page.
Displays a dialog box with a message to the user.
Asks the user to enter text.
Displays a message in the browser's console.