var colors = ["white","blue"]; colors.unshift("red"); //add red to beginning of colors // colors = ["red","white","blue"]
var arr = [23, 45, 12, 67]; arr = [34, ...arr]; // RESULT : [34,23, 45, 12, 67] console.log(arr)