Created
September 1, 2019 03:23
-
-
Save heinthanth/0367af702f0dc55fd117f381c8340054 to your computer and use it in GitHub Desktop.
If else with prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = prompt("Are You Sure to Exit"); | |
if(x) { | |
// someghig if user click OK / Yes | |
} else { | |
// something if user cancle | |
} | |
// in other form | |
if(prompt("Are You Sure to Exit")) { | |
// someghig if user click OK / Yes | |
} else { | |
// something if user cancle | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment