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