Excuse my lack of experience, but I have a query. I usually learn by studying examples, but this specific part of the Javascript code is proving to be quite challenging for me.
if (lvl == "level0" || lvl == "level2" || lvl == "level3") {
arr = window[lvl];
} else {
arr = window[lvl];
arr = arr[dta];
}
var len = arr.length;
for (i = 0; i < len; i++) {
reslt = arr[i];
reslt1 = reslt;
document.getElementById(lvl).options[i + 1] = new Option(reslt1, reslt);
document.getElementById(lvl).disabled = 0;
}
} // opened somewhere else
} // opened somewhere else
I interpret it as an if/else statement with a for loop in between, but I'm unable to locate arr, window, or dta. I'm not sure if they are javascript-specific terms and/or if I am just missing something obvious. Thank you for your assistance.
If you have any suggestions for helpful books or tutorials, please let me know.