For example, I start with:
var currentHistory = ['t1', 't2', 't3', 't4', 't5'];
console.log(currentHistory);
I then swap an element and log again:
var tmp = currentHistory[2];
currentHistory[2] = currentHistory[0];
currentHistory[0] = tmp;
console.log(currentHistory);
Only to see that the output is the same in each case.
Array[5] 't3', 't2', 't1', 't4', 't5'
Array[5] 't3', 't2', 't1', 't4', 't5'
This inconsistency in space and time sent me quite mad last night and an answer would be appreciated.