define length of an array code example
Example 1: length of an array javascript
const clothing = ['shoes', 'shirts', 'socks', 'sweaters'];
console.log(clothing.length);
// expected output: 4
Example 2: js array of length
//initializes an empty array of length 4
new Array(4);