Lesson 30 of 35 · +110 xp

Optional Chaining

Safe navigation.

Explained simply

Your task

Declare const city = user?.address?.city;

optchain.js
▶ Output (javascript)
Click 'Run code' to execute your code in a real sandbox.
← Back