Hi All,
hope someone can see what wrong here I have the following function
function RemoveMenuFromH oldArray(menuNa me) {
var i = 0;
for (i=0;i<=MenusTo HoldOpen.length-1;i++) {
if (MenusToHoldOpe n[i] == menuName) {
MenusToHoldOpen .splice(i,1);
return;
}
}
}
I have found through trial and error that if I do not have the "var i
= 0;" line in the code, the function gets stuck in a loop.
can anyone tell me why , or where the logic is wrong?
hope someone can see what wrong here I have the following function
function RemoveMenuFromH oldArray(menuNa me) {
var i = 0;
for (i=0;i<=MenusTo HoldOpen.length-1;i++) {
if (MenusToHoldOpe n[i] == menuName) {
MenusToHoldOpen .splice(i,1);
return;
}
}
}
I have found through trial and error that if I do not have the "var i
= 0;" line in the code, the function gets stuck in a loop.
can anyone tell me why , or where the logic is wrong?
Comment