Array.unshift() returns new length : unshift : Array JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Array » unshift »

 

Array.unshift() returns new length

















<html>
<head>
<title>Array.unshift() returns new length</title>

<script language="javascript" type="text/javascript">
<!--

var x = new Array(1,2,3,4);
var newLength = x.unshift(10);
alert(x.length);
alert(x);

//-->
</script>

</head>
<body>

<h1>Adding to the Beginning</h1>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Array
» unshift