How are javascript arrays implemented?

后端 未结 9 810
天命终不由人
天命终不由人 2020-12-05 17:09

Namely, how does the following code:

var sup = new Array(5);
sup[0] = \'z3ero\';
sup[1] = \'o3ne\';
sup[4] = \'f3our\';
document.write(sup.length + \"
9条回答
  •  不知归路
    2020-12-05 18:00

    Array object inherits caller, constructor, length, and name properties from Function.prototype.

提交回复
热议问题