I created an array that takes a user input into an array and then reverses the order of the array however I am confused as to how the for loop functions to help
int length{};
std::cin >> length;
int* array{ new int[length]{} };
for(int i=0; i<length; i++)
cin>>array[i];
for (int i=length-1; i>=0; i--) //where I need help understanding the mechanics
cout<<array[i]<<" ";
return 0;