{
out = rogueArray[13];
for (var arrayItem in vanWilder)
{
這是什麼,我告訴上的JSLint:爲什麼JSLint抱怨我的JavaScript?
Error:
Problem at line 52 character 18: Move 'var' declarations to the top of the function.
for (var arrayItem in vanWilder)
Problem at line 52 character 18: Stopping. (30% scanned).
Implied global: requestOne 19,22,25,27, XMLHttpRequest 19, document 29, out 51
Unused variable: evilVariable 25 "onreadystatechange", redBull 25 "onreadystatechange", wildGoose 25 "onreadystatechange", monkeyWrench 25 "onreadystatechange"
如何我會解決這個問題? 如果不是第二個錯誤,至少第一個錯誤!
我相信你只需要把你的變量定義'var arrayItem'放在當前範圍的頂部? – 2011-04-15 01:33:06