JSFiddle - React, Tailwind, and code Playground
by TheBanana
JavaScript
var currentHistory = ['t1', 't2', 't3', 't4', 't5'];
console.log(currentHistory);
var tmp = currentHistory[2];
currentHistory[2] = currentHistory[0];
currentHistory[0] = tmp;
console.log(currentHistory);