Primitives and References

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • easy
  • Pro

A function receives a settings object, changes one of its fields, and suddenly settings elsewhere in the app have changed too. But when the same function changes a number it was passed, nothing outside changes. Explain why, and how you'd avoid the surprise.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →