Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement