4 ms·
> JS maintains a special "length" property for arrays. It doesn't do that for other objects. (The same applies to JS functions and Regexes. They're objects, but
by ludwigvan 13y ago
> JS maintains a special "length" property for arrays. It doesn't do that for other objects. (The same applies to JS functions and Regexes. They're objects, but they're special kinds of objects that can do things regular objects can't.)
Indeed JS functions have a special `length' property too, where one can check the # of arguments specified in the function definition.