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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -