[Solved] Can someone explain what’s going on in this for loop?

[ad_1]

First for-loop fills an array of length x with user entered values.

Second for-loop checks for array like this [1,2,3,3,2,1].
So it checks wether the array is reversev in the second half.

Though because of the return the for-loop will be canceled at first run.

So if the first entry of the array equals the last it will return true, otherwise false.

[ad_2]

solved Can someone explain what’s going on in this for loop?