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

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -