Chrome Extension

Javascript ES6 Spread Operator

var arr1 = [0, 1, 2];
var arr2 = [3, 4, 5];
arr1.push(...arr2);
console.log(arr1);
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Output
"[0,1,2,3,4,5]"

Search Index Data (The code snippet can also be found with below search text)

Javascript ES6 Spread Operator
Was this helpful?
0 Comments