I have just come across the conitnue statement, I have never before seen it used at all. could someone please verify that my understanding of it is correct. Say we have this code:
Am I correct in thinking that if condition 1 is true, the second 'if' statement will never be performed?Code:for (//setup of for loop in here) { if (condition 1) { continue; } if (condition 2) { //perform some tasks } }
Also what would occur if the code was this?:
Thanks in advance for any help given.Code:for (//setup of for loop in here) { if (condition 1) { //perform some tasks } if (condition 2) { continue; } }