How does the confirm() function work in JavaScript?
confirm()
None of the options are correct.
Creates a prompt for the user to enter text.
Displays a message asking for user input.
Shows a dialog with "OK" and "Cancel" to accept or reject.