Test name | Executions per second |
---|---|
concat() + spread operator | 5204251.5 Ops/sec |
Array.flat() | 735748.1 Ops/sec |
var params = [[ 1, 2 ], [ "hello", true, 7 ]];
var other = [].concat(params);
var params = [[1, 2, params], [ "hello", true, 7 ]];
var other = params.flat();