Get the last element in an Array : Array Length : Array JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Array » Array Length »

 

Get the last element in an Array

















<html>
<head>
<title>Get the last element in an Array</title>

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

var x = new Array(2,3,4);

alert(x[x.length-1]);

//-->
</script>

</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Array
» Array Length