JavaScript 语法错误
out += (out ? rogueArray[14] : rogueArray[13]) + arrayItem + ((vanWilder[arrayItem] !== null) ? = + encodeURIComponent(vanWilder[arrayItem]) : rogueArray[13]);
据推测,在 Dreamweaver 中的 [arrayItem 之前] 线上存在语法错误。有什么帮助吗?
这是 DreamWeaver 中的图像:
out += (out ? rogueArray[14] : rogueArray[13]) + arrayItem + ((vanWilder[arrayItem] !== null) ? = + encodeURIComponent(vanWilder[arrayItem]) : rogueArray[13]);
There is supposedly a syntax error here on the line up until [arrayItem in Dreamweaver. Any help?
Here is image of it in DreamWeaver:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
分解你所写的内容...
同样,如果你执行如下操作,调试代码会更容易:
Breaking down what you've written...
As well, it would be easier to debug your code if you did something like the following:
我不确定什么? = + 的意思是,但实际上,如果您只是写这个,那么一行中发生的事情太多了。将其分成单独的行,使用临时变量,然后将其重构为带有嵌套三级运算符的紧凑单行(如果您确实需要在其工作后这样做),一次执行此一步。
I'm not sure what ? = + means, but really, that's too much going on in one line if you're just writing this. Break it apart into separate lines, use temporary variables, and then refactor it down to a compact one liner with nested tertiary operators if you really need to after it works, doing this one step at a time.
您有一个赋值运算符浮动在该表达式的中间。删除它,它在语法上应该是正确的。
You have an assignment operator floating around in the middle of that expression. Remove it and it should be syntactically correct.