<html> <head> <title>Array Demo</title> <script> var a =new Array(); a[0]="Java"; document.write("Original Length =" + a.length + "<br>"); a.unshift("C","C++","VB"); document.write("New Length after unshift method =" + a.length + "<br>"); for(var i=0;i<a.length;i++) { document.write(a[i]); } </script> </head> <body> </body> </html>
Original Length =1
New Length after unshift method =4
CC++VBJava