Answers for "reverse loop"

C#
0

reverse for loop

for (int i = myArray.Length - 1; i >= 0; i--)  
{  
    // Do something ...  
}
Posted by: Guest on March-07-2020
0

Reverse iteration

# use reversed() to loop over sequence in reverse
for i in reversed(range(1, 10, 2)):
  print(i, end=', ')

# =>
# 9, 7, 5, 3, 1,
Posted by: Guest on October-08-2021

C# Answers by Framework

Browse Popular Code Answers by Language