Javascript code to remove first item from array using arr.shift()
Remove first item from array
<script type="text/javascript"> var arr = ["v1", "v2", "v3"]; var firstitem = arr.shift(); arr.forEach (function(item, idx) { document.write("idx=" + idx + " item=" + item + "<br/>"); }); </script>