Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 5
JS_Break and Continue
What is the output of this code with the explanation please var sum=0; for(i=4; i<8; i++){ if(i==6){ continue; } sum +=i; } document.write( sum);
1 Réponse
+ 9
break will stop the current loop entierly
continue will skip to the next loop iteration, skipping all statements below it