Programming Tips - javaScript: prepend (add at the start) an element at the start of an array?

Date: 2016apr17 Language: javaScript Keywords: append, efficient Q. javaScript: prepend (add at the start) an element at the start of an array? A. Use unshift() like this:
var a = [ 'three', 'four', 'five' ]; // Start with an example array a.unshift(['one', 'two']); // prepend an array at the start a.unshift('zero'); // prepend just one element