DEV Community

Discussion on: 5 neat JavaScript tips

Collapse
 
alitahashakir profile image
Ali Taha Shakir

What if I have 15-20 elements which I need to show in component, is it good / good practice to destructure 20 elements as arguments?

Collapse
 
daliboru profile image
Dalibor Belic

Yes! In that case, I would do the 2nd version: function (tiger) { ... and then inside the function: { endangered, latin, ... } = tiger