令人困惑的JSLINT错误

时间:2012-07-23 11:58:19

标签: javascript jslint

我正在为我的朋友和我玩的桌面策略游戏制作一个JavaScript骰子滚轮,但我遇到了麻烦。基本上有一个不规则的命中表,所以我不能使用一个公式(据我所知)判断结果,而是我有一大堆的开关和if ... else语句来确定它们是否是成功或不成功。 因为量大 我已经纠正了JsLint所显示的所有其他错误,但这些错误我似乎无法理解,因为他们引用的字符位于单词的中间。

这是jsFiddle:

http://jsfiddle.net/UEKh6/10/

Error:
Problem at line 19 character 12: Missing semicolon.
var aContnt["<h1>Broken History - Dice roller tool</h1><p>Choose one of the f...

Problem at line 19 character 1249: Expected an assignment or function call and instead saw an expression.
var aContnt["<h1>Broken History - Dice roller tool</h1><p>Choose one of the f...

Implied global: prompt 64,66,262,264,441, morale 441,443, iRoll 442,443

1 个答案:

答案 0 :(得分:5)

在数组的开头和变量声明之间需要一个=符号。

var aContnt = ["

http://jsfiddle.net/rlemon/UEKh6/14/请参见添加的=

相关问题