Unexpected 'continue'

China☆狼群 提交于 2019-12-03 10:46:26

From the JSLint docs:

continue Statement

Avoid use of the continue statement. It tends to obscure the control flow of the function.

So take it out entirely if you want to conform to the conventions that JSLint follows.

What JSLint actually tries to say is to invert the if so you can eliminate the continue:

while (i < 1) {
    if (one !== two) {
        i += 1;
    }
}

Furthermore, don't use "i++", but use "i+=1", if you want to stick to the strict guides of JSLint.

Hope this helps :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!