+ 4

Continue

What is the usage of continue?! Is it to skip for the next value!!

21st Sep 2019, 7:03 PM
Princess Ana
Princess Ana - avatar
12 Respostas
21st Sep 2019, 10:00 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
If you wany the loop to skip the rest of the current value commands you use continue
21st Sep 2019, 7:07 PM
Eliya Ben Baruch
Eliya Ben Baruch - avatar
+ 1
Thank you 🌸
21st Sep 2019, 7:08 PM
Princess Ana
Princess Ana - avatar
+ 1
Jacob Burgess thanks for the heads up. I had no idea of that issue.
21st Sep 2019, 9:47 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
Continue It's used for skipping the current iteration of a loop... And starts with the next iteration.
22nd Sep 2019, 7:59 AM
Anuj Vijjan
Anuj Vijjan - avatar
+ 1
When control encounters continue it reaches the start of the loop to continue the iteration.
22nd Sep 2019, 5:40 PM
Manoj
Manoj - avatar
+ 1
Yes, it is to skip the rest of current iteration and move to the next one in a loop. Some purists don't like goto statements and probably extend it to break and continue. I think, if not overused, there is nothing wrong with continue and break which can get rid of program inefficiency and some unnecessary clock cycles if they were not used.
22nd Sep 2019, 9:35 PM
Sonic
Sonic - avatar
0
Ur welcome
21st Sep 2019, 7:08 PM
Eliya Ben Baruch
Eliya Ben Baruch - avatar
0
Jacob Burgess I don't understand why using continue and break statements would be bad practice?
21st Sep 2019, 8:11 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
Terminates the current iteration
23rd Sep 2019, 1:33 AM
Momula Rajesh
Momula Rajesh - avatar
0
Yes, it skips from your current position in the loop to the next. It's useful in many ways.
23rd Sep 2019, 5:34 AM
AmirHosein Ravaghi
AmirHosein Ravaghi - avatar
0
Yeh
9th Oct 2019, 12:34 PM
umar nuhulule