I am confused about the spread syntax and rest parameter in ES2015. Can anybody explain the difference between them with proper examples?
Basically like in Python:
>>> def func(first, *others): ... return [first, *others] >>> func('a', 'b', 'c') ['a', 'b', 'c']