Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. var o = {};
  2. o.constructor === Object; // true
  3.  
  4. var a = [];
  5. a.constructor === Array; // true
  6.  
  7. var n = new Number(3);
  8. n.constructor === Number; // true
  9.  
  10.  
  11.  
  12. var o = {};
  13. typeof o === "object"; // true
  14.  
  15. var a = [];
  16. typeof a === "object"; // true
  17.  
  18. var n = new Number(3);
  19. typeof n === "number"; // false
  20.  
  21. var n = 3;
  22. typeof n === "number"; // true
  23.  
  24.  
  25. function mydate() {
  26.  
  27. }
  28. mydate.prototype = Date.prototype;
  29.  
  30. mydate.constructor === Function; // true
  31.  
  32. function hello(howareyou) {
  33. this.howareyou = howareyou;
  34. }
  35.  
  36. var cool = new hello("cool");
  37. cool.constructor === hello; // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement