Guest User

Untitled

a guest
Feb 27th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. function MyObject(name) {
  2. this.name = name
  3. }
  4.  
  5. MyObject.prototype.toString = function() { return "My name is " + this.name }
  6.  
  7. > a = new MyObject("node")
  8. > a.toString()
  9. My name is node
Add Comment
Please, Sign In to add comment