How to use Confirm box in JavaScript

Confirm box in Javascript

Confirmation javascript used to confirm an important actions that are taking place on a website. For example, they may be used to confirm an order submission or logout from the website, change the login password we confirm that action before they done..
JavaScript confirm box pops up, the user will have two option OK or Cancel.