Skip to content

Instantly share code, notes, and snippets.

@bradleykronson
Created August 19, 2013 13:55
Show Gist options
  • Save bradleykronson/6269390 to your computer and use it in GitHub Desktop.
Save bradleykronson/6269390 to your computer and use it in GitHub Desktop.
Constructor Pattern
function Class(param1, param2) {
this.var1 = param1;
this.var2 = param2;
this.method = function() {
alert(param1 + "/" + param2);
};
};
var instance = new Class("value1", "value2");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment