Sparky saysSpread (...) expands an iterable; rest (...) collects remaining items into one.
Same three dots, two roles. Spread expands: [...arr, 4] copies and adds, fn(...args) passes elements as arguments, {...obj} shallow-copies. Rest collects: function f(...args) gathers all arguments into an array, and works in destructuring too.
Power-ups you unlock
Spread expands: [...a], {...o}, fn(...args)
Rest collects: function f(...args)
Spread makes quick shallow copies
Same syntax, opposite jobs
NaN the Trickster attacks — common mistakes
Expecting spread to deep-copy (it’s shallow)
Rest parameter not being last
Spreading a non-iterable
Boss battleMerge two arrays with spread, then write a sum function using a rest parameter.