Overloaded so reverse('hello') returns 'olleh' (a string) while
reverse([1, 2, 3]) returns [3, 2, 1] (an array), instead of always
spreading the input into a character/element array.
Overloaded so reverse('hello') returns 'olleh' (a string) while
reverse([1, 2, 3]) returns [3, 2, 1] (an array), instead of always
spreading the input into a character/element array.
Reverse a string or an array.
Overloaded so
reverse('hello')returns'olleh'(a string) whilereverse([1, 2, 3])returns[3, 2, 1](an array), instead of always spreading the input into a character/element array.