Advertisement
SimeonTs

1st - Subtract

Jun 6th, 2020
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function subtract() {
  2.     // Get the Numbers:
  3.     let numOne = Number(document.querySelector('#firstNumber').value);
  4.     let numTwo = Number(document.querySelector('#secondNumber').value);
  5.    
  6.     // Set the Result:
  7.     document.querySelector('#result').textContent = numOne - numTwo;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement