SHARE
TWEET

Untitled

a guest Feb 27th, 2012 19 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top