I am a bit puzzled with the result of console.log(a). Why has the order of the elements in array "a" been reversed? I understand the logic for array "reversed," but can not wrap my head around what happened to array "a."
Example found on Mozilla Developer Network (here).
var a = ['one', 'two', 'three'];
var reversed = a.reverse();
console.log(a); // ['three', 'two', 'one']
console.log(reversed); // ['three', 'two', 'one']
sort, then I suggest you should have gone from there and tried to understand what that means. It's confusing to me, because many of the answers which you claimed "helped" merely regurgitate the documentation with the same "in-place" wording.