title: How to Check whether a user clicked 'Ok' or 'Cancel' while using Confirm() function?
body: <p>I am using a confirm() function for logging out. How can i check whether the user clicked Ok or Cancel. My confirm function is </p>
  
  <p>confirm('Are You Sure')</p>
  
  <p>But now, while clicking both Ok and Cancel the page redirects. How can I resolve it?</p>