I receive this error,
Expected an identifier and instead saw ')'.
in this lines of code. Any how to fix it?
for (; index < nPageFullItemCnt; index++) {
strIndex = "0" + index;
keyIndex = "popup_item_" + strIndex.substr(strIndex.length - 2, 2);
keyItem = document.getElementById(keyIndex);
setPopupKeyText(keyIndex, " ");
keyItem.className = "popupLangItemNone";
keyItem.langId = "";
}
You're not passing in the first parameter to the for()
loop:
for (index = 0; index < nPageFullItemCnt; index++)
{
/* .. */
}
This bit:
for (; index
Is causing that error. The code should validate if you do this:
for (0; index
(As I assume you're not passing the first parameter, on purpose)
However, I'd suggest using a while
loop, instead of a for, if you're not going to make use of the [initialization]; [condition]; [final-expression]
properties in a for
loop.
while(index < nPageFullItemCnt){
// Do stuff;
index++;
}
Technically, the 3 parameters are all optional, but some code validators can throw a error if they're missing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With