TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
9.71k stars 13.12k forks source link

Object Basics: <Should include information about deep copy vs. shallow copy> #28597

Open tman2747 opened 1 month ago

tman2747 commented 1 month ago

Checks

Describe your suggestion

It would be helpful to introduce the concepts of deep copy vs. shallow copy before starting the 4th assignment in this chapter, particularly the assignment on palindromes. This is because some users might attempt to clean the array and then assign the cleaned array to another variable, subsequently calling reverse() on it.

https://developer.mozilla.org/en-US/docs/Glossary/Shallow_copy https://developer.mozilla.org/en-US/docs/Glossary/Deep_copy

Path

Foundations

Lesson Url

https://www.theodinproject.com/lessons/foundations-object-basics

(Optional) Discord Name

tman2747

(Optional) Additional Comments

No response

CouchofTomato commented 1 month ago

@TheOdinProject/foundations Any thoughts on this?

TheSeagullDev commented 1 month ago

I recently completed this lesson and while doing the exercises stumbled upon resources discussing a deep vs shallow copy, so I definitely agree it would make sense to include something on it.

github-actions[bot] commented 2 days ago

This issue is stale because it has had no activity for the last 30 days.