Length Of Array
Object: Array
Property: length
Syntax: array_name.length
An array's length property returns the number of elements in an array.
We can find the length or size of any JavaScript array by using its length property.
Example
<script type="text/javascript">
var names=new Array("Nora " , "Natalie", "Nicole");
var names=new Array("Nora " , "Natalie", "Nicole");
document.write(names.length);
</script>Click the buttons below and see what outputs give.
Here we see that names array has three elements.