from Mastering JS2 years agoYou can use the function to add elements to the beginning of an array.unshift() modifies the array in place, and returns new length of the array. Read at Mastering JS[add][|| ... ]