0
Continue statement
Please I try playing around with the CONTINUE STATEMENT... It works by giving me d opposite of what the loop condition is supposed to give... Is that the work of CONTINUE STATEMENT???
4 Réponses
+ 4
continue simply skips the code that follows it in the current loop iteration
for example, you want to do some operations on data that is on array, execpt for specific indexes or for specific known data.
by using a simple if condition which capture that certain index or indexes, and using the continue, the loop will immedietly advance for the next cycle.
an alternative will be to do:
if(something i wanna skip){
}
else{
do all the other stuff i DO NOT want to skip
}
TL;DR
continue will SKIP whatever follows it inside a loop and contine to the next loop iteration
+ 4
np ^^
0
Thanks alot bro
0
Nice thx