its called Optional chaining (?.)

The optional chaining operator provides a way to simplify accessing values through connected objects when it's possible that a reference or function may be undefined or null.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

Answer from Jay on Stack Overflow
🌐
freeCodeCamp
freecodecamp.org › news › how-the-question-mark-works-in-javascript
How the Question Mark (?) Operator Works in JavaScript
February 3, 2021 - By Nishant Kumar The conditional or question mark operator, represented by a ?, is one of the most powerful features in JavaScript. The ? operator is used in conditional statements, and when paired with a :, can function as a compact alternative ...
🌐
Built In
builtin.com › software-engineering-perspectives › javascript-question-mark-operator
JavaScript Question Mark (?) Operator Explained | Built In
The question mark operator ? takes three operands: a condition, a value if that condition is true and a value if that condition is false. It’s used in JavaScript to shorten an if else statement to one line of code.
🌐
Medium
medium.com › @goyalpranjal › theres-more-than-meets-the-eye-for-question-mark-in-javascript-e1aedd5ffe77
There’s More Than Meets the Eye for Question Mark (?) in JavaScript | by Pranjal Goyal | Medium
July 4, 2023 - Introduced in ECMAScript 2020, Optional Chaining (?.) is a powerful feature that simplifies accessing nested properties of objects without worrying about potential null or undefined values. The Optional Chaining operator is denoted by the question ...
🌐
JavaScript in Plain English
javascript.plainenglish.io › 3-uses-of-in-javascript-why-pro-developers-love-using-javascript-operator-565bc8b235a4
3 Uses of ‘?’ in JavaScript❓. How ( ? / ?? / ?. ) operators work in… | by Sayyed Hammad Ali | JavaScript in Plain English
August 2, 2024 - The JavaScript question mark dot ... It enables you to read the value of a property located deep within a chain of connected objects without having to check that a child actually exists deep in the object or not...
🌐
CoreUI
coreui.io › blog › what-is-double-question-mark-in-javascript
What is Double Question Mark in JavaScript? · CoreUI
March 12, 2024 - In this example, optional chaining (?.) safely navigates through the object. If any part of the chain is undefined, it evaluates to undefined, and the nullish coalescing operator then provides a default value. The double question mark in JavaScript is more than just syntactic sugar; it’s a practical tool that enhances code clarity, prevents bugs, and ensures that default values are used only when appropriate.
🌐
Robin Wieruch
robinwieruch.de › javascript-variable-question-mark
JavaScript Variable with Question Mark
The question mark in JavaScript is commonly used as conditional operator -- called ternary operator when used with a colon (:) and a question mark (?) -- to assign a variable name conditionally.
🌐
Reddit
reddit.com › r/learnjavascript › what does this “?.” mean?
r/learnjavascript on Reddit: What does this “?.” Mean?
December 4, 2022 - https://www.freecodecamp.org/news/how-the-question-mark-works-in-javascript/ ... It's the optional chaining operator.
Find elsewhere
🌐
Eran Stiller
eranstiller.com › javascript-double-question-marks
What Is the JavaScript Double Question Marks (??) Operator?
September 24, 2023 - You should use the JavaScript double question marks operator when you want to assign a default value in case the initial value is null or undefined. It’s convenient when you’re accessing properties of an object that might not exist.
🌐
JavaScript Tutorial
javascripttutorial.net › home › javascript tutorial › javascript optional chaining operator
JavaScript Optional Chaining Operator (?.)
December 17, 2023 - ES2020 introduced the optional chaining operator denoted by the question mark followed by a dot: ?.Code language: JavaScript (javascript) To access a property of an object using the optional chaining operator, you use one of the following: ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators › Optional_chaining
Optional chaining (?.) - JavaScript | MDN
By using the ?. operator instead of just ., JavaScript knows to implicitly check to be sure obj.first is not null or undefined before attempting to access obj.first.second.
🌐
Kodeclik
kodeclik.com › question-mark-in-javascript
The question mark (?) operator in Javascript
July 15, 2025 - The optional chaining operator is a new feature in JavaScript that allows you to safely access deeply nested properties of an object without worrying about the intermediate properties being null or undefined.
🌐
Ponyfoo
ponyfoo.com › articles › null-propagation-operator
Null Propagation Operator in JavaScript — Pony Foo
The Null Propagation operator is a native solution to the problem, allowing us to handle these cases by sprinkling our code with question marks.
🌐
Medium
medium.com › totally-typescript › what-does-the-question-mark-dot-mean-in-javascript-or-typescript-9d7d744f6077
What Does the ?. Question Mark Dot Mean in JavaScript or TypeScript? | by Dr. Derek Austin 🥳 | Totally TypeScript | Medium
May 16, 2023 - What Does the ?. Question Mark Dot Mean in JavaScript or TypeScript? Unraveling the mystery of the ?. optional chaining operator with practical examples Introduction: Optional Chaining in JS / TS …
🌐
EyeHunts
tutorial.eyehunts.com › home › javascript question mark dot | ?. operator
JavaScript question mark dot | ?. Operator
July 31, 2023 - JavaScript question mark dot is called optional chaining operator. It allows reading the value of a property located in a Nested object.
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › objects: the basics
Optional chaining '?.'
The obvious solution would be to check the value using if or the conditional operator ?, before accessing its property, like this:
🌐
Educative
educative.io › answers › how-the-question-mark-operator-works-in-javascript
How the question mark (?) operator works in JavaScript
In this example, we determine whether a person is an adult based on their age using the ? operator. If the age is greater than 18, isAdult will be assigned the value Yes; otherwise, it will be assigned No. The question mark operator can also be used inside a function call to make decisions based on the parameters passed in the function.