Array.length与Array.prototype.length

问题描述:

我发现Array对象和Array.prototype都具有length属性.我对使用Array.length属性感到困惑.您如何使用它?

I found that both the Array Object and Array.prototype have the length property. I am confused on using the Array.length property. How do you use it?

Console.log(Object.getOwnpropertyNames(Array));//As per Internet Explorer

输出:

length,arguments,caller,prototype,isArray,

PrototypeisArray可用,但是如何使用length属性?

Prototype and isArray is usable but how do you use the length property?

Array是构造函数.

所有函数都有一个length属性,该属性返回函数定义中已声明参数的数量.

All functions have a length property that returns the number of declared parameters in the function definition.