Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.18 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data