JS

JavaScript ES6 - rest operator with code example

17.

What is the rest operator in JavaScript?

The rest operator is used to concatenate two arrays.

The rest operator is used to spread an array into individual elements.

The rest operator is used to represent a single argument as an array.

The rest operator is used to represent an indefinite number of arguments as an array.