Creating a Simple Web Page Confirmation in Javascript


Use confirm() to ask the user to confirm a choice.

Source Code

let userResponse = confirm("Do you agree?");
console.log(userResponse); // true if OK is clicked, false if Cancel
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments