This is more clean, without using the array index of [0]
const colors = ['white', 'black', 'red', 'blue', 'green'];
// will push the blue to the end of the array
colors.push(colors.splice(colors.indexOf('blue'), 1).pop());
console.debug(colors);
// ["white", "black", "red", "green", "blue"]