Closed LukeAskew closed 10 years ago
// bad var that = new Object(); that._property = "Nancy";
// good
var Test = function(){
this._privateVar = "test";
};
Test.prototype = {
funx:function(){
this._privateVar = "foo";
}
};
// bad var test = new Test(); test._privateVar = "test";
"protected" varaibles.
Protect the prototype.