EN
JavaScript - confirm function
3 points
This article will show you how to use the confirm functions in JavaScript to display some message where the user is asked for operation confirmation.
The confirm()
method displays a built-in dialog box with a message, OK, and a Cancel button.

xxxxxxxxxx
1
const booleanResult = confirm(questionString);
xxxxxxxxxx
1
const deleteConfirmation = confirm('Are you sure you want to delete it?');
2
console.log(deleteConfirmation); // true / false as boolean