Remove First Element from an Array using JavaScript

JavaScript code. 
  1. <script type="text/javascript">  
  2.    element = new Array("D","O","N","E");  
  3.    document.write("Elements in array: ",element,"  
  4.    <br>  
  5.    <br>");  
  6.    removed = element.shift();  
  7.    document.write("Removed element is: ",removed,"  
  8.    <br>  
  9.    <br>");  
  10.    document.write("Elements left in array: ",element);  
  11.   
  12. </script>  
 Thank you, keep learning and sharing.