Node.js Node.js v6 New Features and Improvement Spread Operator


function myFunction(x, y, z) { }
var args = [0, 1, 2];

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 are expected. Just like the rest parameters simply preface your array with ...