首页 > 编程语言 > 详细

JavaScript Array vs new Array区别

时间:2016-07-02 10:30:38      阅读:303      评论:0      收藏:0      [点我收藏+]

  规范说明 

  When Array is called as a function rather than as a constructor, it creates and initialises a new Array object. Thus the function call Array(…) is equivalent to the object creation expression new Array(…) with the same arguments.

  当数组作为函数调用而不是构造函数调用时,它会创建并初始化一个新的数组对象。因此当Array(...)和new Array(...)接收同样的参数时,它们是相同的。

JavaScript Array vs new Array区别

原文:http://www.cnblogs.com/liutie1030/p/5634867.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!