How can you capture a user's response using the confirm() function in JavaScript?
confirm()
By using an event listener on the dialog box.
By checking the console for user input.
By passing a callback function as an argument.
By storing the function's return value in a variable.