Skip to content

Instantly share code, notes, and snippets.

@thaiall
Created October 3, 2016 09:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save thaiall/1fe8ef8528fa8ffe31e2dbc8ff9c36eb to your computer and use it in GitHub Desktop.
Save thaiall/1fe8ef8528fa8ffe31e2dbc8ff9c36eb to your computer and use it in GitHub Desktop.
put 2 number in window prompt and use plus operator with number converting by parseInt function
<script>
var x = window.prompt("put a number")
var y = window.prompt("put another number")
var z = parseInt(x) + parseInt(y);
window.alert(z);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment