I was browsing through some code and I was wondering how this could be useful
grid.push([].concat(row));
In my understanding it is the same as
grid.push([row]);
Why the 'concat' fuss?
Check my variant:
let arr = [];
let tmp = [ 1, 2, '300$' ];
arr.push(...tmp);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With