CodeGuide
CodeGuide copied to clipboard
请问js这段具体什么问题
http://alloyteam.github.io/CodeGuide/#js-jshint 这个下边
// not good
var singleton = new function() {
var privateVar;
this.publicMethod = function() {
privateVar = 1;
};
this.publicMethod2 = function() {
privateVar = 2;
};
};
请给出建议写法,,