js - calculate length of array code example
Example 1: js array of length
//initializes an empty array of length 4
new Array(4);
Example 2: js length of array
arr = ["a", "b", "c"];
len = arr.length; // 3
//initializes an empty array of length 4
new Array(4);
arr = ["a", "b", "c"];
len = arr.length; // 3