-
How can I continue/break a for loop from within two if statements.
Hi! I have for loop with one if inside and inside that if another if and I would need to continue the loop if the 2nd if is false.
I searched some and didn’t find any solution except in javascript, being able to use goto. I tried in ExtendScript Toolkit and the word goto lit up blue but when I ran it it says “Illegal use of reserved word ‘goto’.
This is my code in short way:function addToRenderQueue() {
if (folder.exists) {
*******
for (var i = 0; selectedID.length > i; i++) {
*******
if (selectedCompItem instanceof CompItem) {
*******
} else {
*******
if (selectedCompItem.mainSource.file != undefined) {
*******
} else {
*******
goto endOfLoop;
}
}
endOfLoop:
}
}
}