在此条件中使用not运算符(!
)会给我:
“未捕获的SyntaxError:意外的令牌!”
if (text.includes(input[j])) {
$(Messages[i]).hide();
}
else if !(text.includes(input[j])) {
$(Messages[i]).show();
}
为什么!
不在这里工作?
答案 0 :(得分:7)
()
应在else if (!text.includes(input[j]))
之内:
{{1}}