If we are traversing an array and need to update an element in some condition then it is quite tricky to do that in foreach loop. For example, if we need to increase each element by 2 of an integer ...