JavaScript, Refreshed
Modern syntax & immutability
Lesson 5 of 5
Optional chaining, nullish coalescing, and spread copies let you update state without mutating it.
What you'll learn
- Safely read deep values with ?. and supply defaults with ??
- Know why const prevents reassignment but not mutation
- Update objects immutably by returning new copies
Members only
A free account unlocks this lesson and every other one.
Runnable challenges, knowledge checks, and progress that syncs across your devices. No card needed.
Not sure yet? Try the free lesson first: Values, types & coercion