Discussion on: What Javascript Spread Operator is, How It Works and How to Use It

alexdevero profile image
Alex Devero Author

Thank you Jeremy for pointing this out. You are correct. Spread will create deep copy only for the top-level properties. In other cases, combination of JSON.parse() and JSON.stringify will create a deep copy.