Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. var makeButton = document.createElementById('button');
  2.  
  3. document.body.appendChild(makeButton);
  4.  
  5. makeButton.setAttribute('class', 'clicked');
  6.  
  7. makeButton.onclick = function(event) {
  8. console.log("hello");
  9. }
  10.  
  11. makeButton.onclick = function(event) {
  12. console.log(this);
  13. }
  14.  
  15. the window is everything in the scope of the javascript
  16.  
  17.  
  18. var dingHandle;
  19.  
  20. function writeDing() {
  21. dingHandle = window.setTimeout(dingIt(), 3000);
  22. }
  23.  
  24. function dingIt() {
  25. console.log('Ding!');
  26. }
  27.  
  28.  
  29. console.log(gameOfThrones[1][2]);
  30.  
  31.  
  32. console.log(gameOfThrones2.boltons[1]);
  33.  
  34.  
  35. gameOfThrones2.greyjoys[1] = "Reek"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement