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