Level 1M6Lesson 6.7

beginner27 minby DevFox

References vs copies: why changing one object changes another

See why a second box, a parameter or a list leads to the same object rather than a copy, so a change made through one name is seen through every name. Make a real copy with new braces when a change must not reach the original, and tell the two apart with ===.

  • Fundamentals
  • TypeScript
References vs copies: why changing one object changes another. Read this lesson at .