The number of elements in a Javascript array

eg :

var str = new Array(“First element”, “Second”, “Last”);

alert(str.length) //will return the number of elements in an array

Share

One thought on “The number of elements in a Javascript array”

Leave a Reply

Your email address will not be published. Required fields are marked *