reverse() method reverses the order of the elements in an array.
.reverse()method the arrays last element becomes first and the first element becomes the last. This method also made the changes in the original array.
Now if we don’t want to mutate our original array, so we can use this -
.slice() method returns the selected elements in an array, as a new array object.
.reverse()method changes the sequence of elements of the given array and returns the reverse sequence.
The spread syntax is simply three dots:
Spread syntax can perform all of the array manipulations that previously required push, concat, or slice methods.
.reduce() method reduces the array to a single value.
.reduce() method executes a provided function for each value of the array (from left-to-right).
Note: this method does not change the original array.
.reduceRight() method reduces the array to a single value.
.reduceRight()method executes a provided function for each value of the array (from right-to-left).
arr.reduceRight(callback(accumulator, currentValue[, index[, array]])[, initialValue])
“Programmers are not to be measured by their ingenuity and their logic but by the completeness of their case analysis.”
You can check this link for more details.