Example 3:

The following example uses for loop with continue statement:

PS C:\> for ($k=10 ; $k -gt 0;$k--)  

>> {  

>> if ($k -eq 5)  

>> {  

>> continue  

>> }  

>> echo $k  

>> }

Output:10 9 8 7 6 4 3 2 1


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *