JavaScript code.
- <script type="text/javascript">
- element = new Array("D","O","N","E");
- document.write("Elements in array: ",element,"
- <br>
- <br>");
- removed = element.shift();
- document.write("Removed element is: ",removed,"
- <br>
- <br>");
- document.write("Elements left in array: ",element);
-
- </script>
Thank you, keep learning and sharing.