Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function subtract() {
- // Get the Numbers:
- let numOne = Number(document.querySelector('#firstNumber').value);
- let numTwo = Number(document.querySelector('#secondNumber').value);
- // Set the Result:
- document.querySelector('#result').textContent = numOne - numTwo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement