The spread syntax allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) or multiple variables (for destructuring assignment) are expected.

Example

Common usage of array as arguments to a function is as below:

function myFunction(x, y, z) {
    console.log(x);
    console.log(y);
    console.log(z);
}
var args = [0, 1, 2];
myFunction(args);
//[0, 1, 2]
//undefined
//undefined

With ES2015 spread you can now write the above as:

function myFunction(x, y, z) {
    console.log(x);
    console.log(y);
    console.log(z);
}
myFunction(...args);
//0
//1
//2

Rest operator Vs spread syntax

Rest operator... looks exactly like the spread syntax... and is used for destructuring arrays and objects.

In a way, Rest elements are the opposite of spread elements - spread elements 'expands' an array into its elements, and rest elements collects multiple elements and 'condenses' into a single element.