Spread Operator is of a great use in case of dealing with arrays and objects. Here how to merge two arrays using it.
const arr1 = [1, 2];
const arr2 = [3, 4];
const arr3 = [...arr1, ...arr2]; // [1, 2, 3, 4]
Spread Operator is of a great use in case of dealing with arrays and objects. Here how to merge two arrays using it.
const arr1 = [1, 2];
const arr2 = [3, 4];
const arr3 = [...arr1, ...arr2]; // [1, 2, 3, 4]
For further actions, you may consider blocking this person and/or reporting abuse
Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.
Prince -
Youssef El Idrissi -
DPC -
DPC -
Top comments (0)