daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <input type="text" id="my_input1" />
  2. <input type="text" id="my_input2" />
  3. <input type="button" value="Add Them Together" onclick="doMath();" />
  4. <script type="text/javascript">
  5.     function doMath()
  6.     {
  7.         var my_input1 = document.getElementById('my_input1').value;
  8.         var my_input2 = document.getElementById('my_input2').value;
  9.         var sum = parseInt(my_input1) + parseInt(my_input2);
  10.         document.write(sum);
  11.     }
  12.    
  13. 'a'.charCodeAt(0)  // 97
  14.    
  15. let values = { a: 1, b: 2, c: 3 }
  16. values.a // 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top