how to print based on array length javascript code example Example: length of an array javascript array.length