What can you use the alert() function for in JavaScript?
alert()
To confirm a user's action.
To request user input through a textbox.
To redirect the user to a different page.
To display an error message to the user.