loading...

re: 5 Uses for the Spread Operator VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Nice quick round up! Thanks! A quick word of warning, when copying an array, it does a shallow copy, so doing: let myarr = [[1],[2]] let copyArr...
 

Definitely. My understanding is that this only applies because the example above is multidimensional. So the first level is copied, but the deeper levels are referenced. If it's one-dimensional it is a deep copy.

Code of Conduct Report abuse