defining array in javascript

前端 未结 5 1062
忘了有多久
忘了有多久 2020-12-05 14:02

I want to create an array in javascript and remember two ways of doing it so I just want to know what the fundamental differences are and if there is a performance differenc

5条回答
  •  感动是毒
    2020-12-05 14:34

    I believe the performance benefits are negligible.

    See http://jsperf.com/new-array-vs-literal-array/4

提交回复
热议问题