8. C# - BREAK/CONTINUE JUMPS

 Breaks:

break; // breaks loops


Continue:

continue; // skips any code after/below it if conditions are met.


Example:

for (int i = 0; i<5; i++) 

Console.WriteLine(“i = {0}”, i); if (i == 2) 

continue; 

Console.WriteLine(“I will not be printed if i=2.\n”); 

}



Comments

Popular posts from this blog

2. FreeCodeCamp - Dynamic Programming - Learn to Solve Algorithmic Problems & Coding Challenges

20. Data Analytics - Analyze Data to Answer Questions - Week 1

3. Algorithms - Selection Sort