Spread vs Rest in JavaScript: Same Syntax, Totally Different Powers
Why do developers get confused?
If you’ve ever seen ... in JavaScript, you probably thought:
“Wait… is this spread or rest?”
The tricky part is:👉 Both spread and rest use the same syntax (...)
But
spreadvsrestinjavascriptsamesyntaxtotallydifferentpowers.hashnode.dev4 min read