Skip to content

Instantly share code, notes, and snippets.

@klaemo
Created May 21, 2015 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klaemo/5b4ab529b2e02fb42361 to your computer and use it in GitHub Desktop.
Save klaemo/5b4ab529b2e02fb42361 to your computer and use it in GitHub Desktop.
constructor
function MyThing (name) {
this.name = name
}
MyThing.prototype.sayHello = function () {
return 'hello ' + this.name
}
var thing = new MyThing('Erik')
thing.sayHello()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment