A Message Box with Options
In the strict sense, the confirm() uses the same argument terminology as the alert() function. This means that you can use it to display a number, a word, a sentence, or a paragraph.
To make it effective, the confirm() function is better used to ask/display a question to the user. The user makes a decision by clicking OK or Cancel. If the user clicks OK, the function returns true. If the user clicks Cancel, the function returns false. Here is an example:
Next: Conversion Functions