Reverse an array

Added some code and explanation