For sure, in this simple example, the rest+destructuring combo doesn't really make sense. I'd stick with the 2nd way for sure πI think the community example was just showing a different way of doing things that achieve the same thing. Coding is all about communication, so we should pick the one that best facilitates that. I always enjoy seeing all the different ways because it builds up my toolbox. The best tool is always dependent on the situation. Thanks for pointing this out and allowing me to adjust my code notes π
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For sure, in this simple example, the rest+destructuring combo doesn't really make sense. I'd stick with the 2nd way for sure πI think the community example was just showing a different way of doing things that achieve the same thing. Coding is all about communication, so we should pick the one that best facilitates that. I always enjoy seeing all the different ways because it builds up my toolbox. The best tool is always dependent on the situation. Thanks for pointing this out and allowing me to adjust my code notes π