DEV Community

Discussion on: 14 Awesome JavaScript Array Tips You Should Know About

Collapse
 
szymondziewonski profile image
Szymon Dziewoński • Edited

You should probably write that copying array/object with spread operator/slice/object.assign/json technique is just shallow copying - which is important information. Also you can use Object.assign([], [your array]) and another one JSON.parse(JSON.stringify([your array])) (but I would not recommend it to you) :)