how to count elements in an array js code example Example: length of an array javascript array.length