liil'boo
liil'boo3y ago

✅ – Liil' Boo – 09-03 Jul 30

Hello, Context & Tech : Javascript, Arrays & destructuring I've encountered a piece of code that I do not understand , what exactly is being destructured here
Array.from({length: 5})
Array.from({length: 5})
Thanks in advance
6 Replies
liil'boo
liil'boo3y ago
@ping me if answer, thank you 🙏
Nesho
Nesho3y ago
@Liil' Boo It’s just creating an array of length 5. Nothing is being destrucured, it’s passing an options object in.
liil'boo
liil'boo3y ago
Oh, So, it's a property assignment* ? I coincidentally also got an answer in the channel : help-react (Not a cross-posting, someone happened to post a similar code snippet)
Nesho
Nesho3y ago
Yep
liil'boo
liil'boo3y ago
@Nesho thanks ✅
reactibot
reactibot3y ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1002864005012017302 This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1002864005012017302