How will you create a modal dialog with two buttons "Ok" and "Cancel" to ask user if he/she is sure to delete the item?
The Window.confirm() method displays a modal dialog with an optional message and two buttons, OK and Cancel. Example:

if (confirm("Sure to delete item?") {
      function(){} // delete item

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes