JavaScript Basics
JavaScript Objects
JavaScript Advanced
JS Useful References
JS Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Javascript Array length Property
Description:
Javascript array length property returns an unsigned, 32-bit integer that specifies the number of elements in an array.
Syntax:
Here is the detail of parameters:
Return Value:
Returns the length of the array.
Example:
<html>
<head>
<title>JavaScript Array length Property</title>
</head>
<body>
<script type="text/javascript">
var arr = new Array( 10, 20, 30 );
document.write("arr.length is : " + arr.length);
</script>
</body>
</html>
|
This will produce following result:
To understand it in better way you can Try it yourself.
|
|
|