
Daniel Trebbien
By: a guest on
May 26th, 2010 | syntax:
JavaScript | size: 0.40 KB | hits: 56 | expires: Never
Model.Foo = function() {
// private stuff
var a, b;
// method which accesses the variable `a`
this.func = function() {
window.alert(a);
};
// public properties
this.attr1 = '';
this.attr2 = '';
};
Model.Foo.prototype = {
func1 : function() { /* ... */},
func2 : function() { /* ... */}
//,other prototype functions
};