Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1.  
  2. ## Literal Objects
  3. ```
  4. var myLiteralObject = {
  5. property1: 'some value',
  6. property2: 999,
  7. property3: ['a', 'b', 'c'],
  8. method1: function(){
  9. return 'hi!';
  10. }
  11.  
  12. //...
  13. }
  14. ```
  15. ## Using Contructor Funcitons
  16. ```
  17. var MyConstructorFunc = function(){
  18. return...
  19. }
  20. ```
  21.  
  22. ## Using Prototype
  23. ```
  24. Object.prototype.create();
  25. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement