3 ms·
We are in agreement here. My suggestion was to make the deepClone method also take arrays, and walk through them copying values in the for loop (significantly f
by ricardobeat 9y ago
We are in agreement here. My suggestion was to make the deepClone method also take arrays, and walk through them copying values in the for loop (significantly faster than map).
Again, I linked to a full implementation at the end; was more commenting on the lack of this particular approach, wrote this on the spot as an example.