且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JSLint说缺少新的关键字

更新时间:2022-04-15 22:41:27

这是约定构造函数(例如: Array Object )以大写字母开头。

It is the convention that constructors (eg: Array, Object) are starting with a capital.

JSLint抱怨,因为它认为你正在尝试使用构造函数,而不是关键字。要解决此问题,请使用非大写字符启动函数。

JSLint complains, because it thinks that you're trying to use a constructor, without new keyword. To fix the problem, start your function with a non-uppercase character.