r/reactjs • • Dec 02 '21

Meta Coding Interview with Dan Abramov

https://www.youtube.com/watch?v=XEt09iK8IXs
618 Upvotes

140 comments sorted by

View all comments

Show parent comments

2

u/Aoshi_ Dec 03 '21

Thanks! That makes a bit more sense. I rarely, if ever use the Array constructor. I had never seen [empty × 5] before.

Is there a difference between new Array() and Array()? Is it the same constructor?

1

u/fgutz Dec 03 '21

yeah it's the same, at least that how I'm interpreting the spec: https://262.ecma-international.org/5.1/#sec-15.4.1