<html> <head> <title>Array Demo</title> <script> var a =new Array(); a[0]="C"; a[1]="C++"; a[2]="Java"; a[3]="SQL"; document.write("Original Length =" + a.length + "<br>"); a.splice(2); document.write("New Length =" + a.length + "<br>"); for(var i=0;i < a.length;i++) { document.write(a[i]); } </script> </head> <body> </body> </html>
Original Length =4
New Length =2
CC++