MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/reactjs/comments/r7cklo/coding_interview_with_dan_abramov/hn1h9wy
r/reactjs • u/camouflage365 • Dec 02 '21
140 comments sorted by
View all comments
Show parent comments
2
Thanks! That makes a bit more sense. I rarely, if ever use the Array constructor. I had never seen [empty × 5] before.
[empty × 5]
Is there a difference between new Array() and Array()? Is it the same constructor?
new Array()
Array()
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
1
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
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()andArray()? Is it the same constructor?