Multiple choice technology operating systems

Which function is used to show a Yes/No message box

  1. messagebox

  2. alert

  3. confirm

  4. input

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The confirm() function in JavaScript displays a dialog box with 'OK' and 'Cancel' buttons, returning true for OK and false for Cancel. This is the standard method for Yes/No confirmation dialogs in client-side JavaScript.