The rest parameter syntax allows us to represent an indefinite number of arguments as an array. It is often used in function definitions and array destructuring.
In function definitions, it is used to gather remaining function arguments into an array:
```
function sum(…numbers) {
return numbers.reduce((prev, curr) => prev + curr, 0);
}
console.log(sum(1, 2, 3)); // Prints 6
```
In the example above, all arguments passed to the `sum` function are gathered into an array `numbers`.
In array destructuring, it is used to gather remaining elements into an array:
```
let [first, …rest] = [1, 2, 3, 4, 5];
console.log(first); // Prints 1
console.log(rest); // Prints [2, 3, 4, 5]
```
In the example above, the first element of the array is assigned to `first`, and the remaining elements are gathered into the array `rest`.