DEV Community

Discussion on: Answer: How to get the first element of an array?

Collapse
 
cipharius profile image
Valts Liepiņš

What about keeping it simple as suggested in the accepted answer?

stackoverflow.com/a/4090513

Collapse
 
abdullahalnoor profile image
Md Abdullah al noor

Your right on your statement ..but I think when I handle State like in react/vue. It's handy & depend on situation....