F
fazstp
Is there an equivalent of the continue used in javascript to skip a for
loop?
I have a number of if then conditions to be met and rather than nest
them I would prefer to skip to the next loop if the condition isn't
met.
ie:
For n = 1 to 10
If (condition1 = false) Then
' skip anything doesn't meet 1st criteria
' this is where I would use continue in javascript
End If
' If it gets to this point I know 1st condition has been met
If (condition2 = false) Then
' skip anything doesn't meet 2nd criteria
End If
' If it gets to this point I know 1st and 2nd conditions have been met
Next n
loop?
I have a number of if then conditions to be met and rather than nest
them I would prefer to skip to the next loop if the condition isn't
met.
ie:
For n = 1 to 10
If (condition1 = false) Then
' skip anything doesn't meet 1st criteria
' this is where I would use continue in javascript
End If
' If it gets to this point I know 1st condition has been met
If (condition2 = false) Then
' skip anything doesn't meet 2nd criteria
End If
' If it gets to this point I know 1st and 2nd conditions have been met
Next n