Is the difference between them is just syntax or there’s a performance issue?
Both, and more…
Rest parameters:
- Are a known idiom in other languages (Ruby, Python).
- Are esier to read and maintain (vs.
slice
). - Are easier to understand for beginners.
- Can (and likely will) result in better performance, since engines can optimize.
- Are tool friendlier, as they can be analyzed statically.