Skip to content

Instantly share code, notes, and snippets.

@SmashedFrenzy16
Created April 3, 2022 17:04
Show Gist options
  • Save SmashedFrenzy16/5f9697fcdc7ca9db19cdbbd273318db8 to your computer and use it in GitHub Desktop.
Save SmashedFrenzy16/5f9697fcdc7ca9db19cdbbd273318db8 to your computer and use it in GitHub Desktop.
An adding calculator made in JavaScript.
var firstNum = window.prompt("First number: ");
number1 = parseInt(firstNum);
var secondNum = window.prompt("Second number: ");
number2 = parseInt(secondNum);
alert("Press OK to see results.");
alert(number1 + number2);
<script src="adding-calculator.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment