javascript window confirm
// window.confirm opens a confirmation box with two buttons; 'Ok' or 'Cancel'
window.confirm("Message");
// window.confirm returns a boolean, true or false, based on whether the user pressed 'Ok' (which will result in true) or 'Cancel' (which will result in false)
if (window.confirm("Message")) {
console.log("'Ok' was pressed");
} else {
console.log("'Cancel' was pressed");
}