1const names = ["Bob", "Cassandra"]
2
3names.unshift("Alex")
4
5names === ["Alex", "Bob", "Cassandra"]
1// Build an array of test data.
2var data = [ "X" ];
3
4// Unshift data onto the array. Unshift() prepends elements to
5// the beginning of the given array. Note that it can take more
6// than one argument. In the output, notice that when unshift()
7// takes multiple arguments, they are prepended in a right-to-left
8// order (mimicing their appearence in the arguments list).
9data.unshift( "A" );
10data.unshift( "B", "C" );
11
12// Output resultant array.
13console.log( data );