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