array lenth javascript 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 length of array
arr = ["a", "b", "c"];
len = arr.length; // 3