$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #203

Fill in the blank

// read a nested value without crashing
const city = user____.address?.city;

Answer: ?. (also accepted: ?.)

Optional chaining short-circuits to undefined instead of throwing.
Play Problem Solving ▸