confirm() Function

The confirm() function shows a message box that optionally includes message text, and has OK and Cancel buttons.

Screenshot of a confirm dialog in JetScript

Syntax

confirm()
confirm(message)

Parameters

Return value

A boolean value:

Example

> confirm()
true
> confirm("Can I borrow $5?")
true

References