
The spread operator ... expands an array or object into individual elements: const combined = [...arr1, ...arr2];. The rest operator uses the same syntax in function parameters to collect remaining arguments: function sum(...numbers) {}. Both are essential in modern JavaScript for copying, merging, and handling variable numbers of arguments.
Reference:
TaskLoco™ — The Sticky Note GOAT