javascript - JSLint a constructor name should not start with a lowercase letter -
i'm getting following jslint error: constructor name should not start lowercase letter
. error when encounters identifier starting lowercase letter preceded new
operator.
i have model called mymodel
contains function this.dosomething = function();
in controller access function:
self.mymodel = mymodel; var newmodel = new self.mymodel.dosomething();
although works take jslint error dosomething()
should dosomething()
although this.dosomething = function()
seems incorrect syntax me. question is, best practice syntax remove error?
Comments
Post a Comment