JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://www.frontendvideo.org/static/js/console-to-dom.js"></script>
JavaScript
var foo = ['d', 'e', 'f'];
//the unshift method adds the element
//to the beginning of the array,
//and returns the new length
console.warn('foo.unshift("c") -> ' + foo.unshift("c")); // 4
console.dir(foo); // ['c', d', 'e', 'f']
console.warn('foo.unshift("b") -> ' + foo.unshift("b")); // 5
console.dir(foo); // ['b', c', d', 'e', 'f']
console.warn('foo.unshift("a") -> ' + foo.unshift("a")); // 6
console.dir(foo); // ['a', 'b', 'c', 'd', 'e', 'f']