W3Schools
w3schools.com › js › js_2020.asp
W3Schools.com
Optional chaining not only works on object properties, but also on function calls and arrays.
W3Schools
w3schools.io › javascript › es11-optional-chaining
ES2020(ES11) - Javascript Optional Chaining Operator - w3schools
This tutorial covers the latest javascript features, Optional Chaining Operator released in 2020. ES11 or ES2020 or EcmaScript2020 .
Videos
07:07
Typescript Optional Chaining - How To Avoid Null Related ...
07:17
Javascript Nuggets - Optional Chaining - YouTube
02:23
Optional Chaining (?.) In 2 Minutes - ES2020 - YouTube
13:13
Optional Chaining In JavaScript: Awesome. - YouTube
05:32
Optional chaining in ~5 minutes - YouTube
01:40
Optional Chaining in JavaScript - YouTube
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators › Optional_chaining
Optional chaining (?.) - JavaScript | MDN
This is an idiomatic pattern in JavaScript, but it gets verbose when the chain is long, and it's not safe. For example, if obj.first is a Falsy value that's not null or undefined, such as 0, it would still short-circuit and make nestedProp become 0, which may not be desirable. With the optional chaining operator (?.), however, you don't have to explicitly test and short-circuit based on the state of obj.first before trying to access obj.first.second:
W3Schools
w3schools.com › typescript › typescript_special_types.php
TypeScript Special Types
'default'; // Optional chaining (?.) - safely access nested properties const street = user?.address?.street; Important: These types are most useful when strictNullChecks is enabled in your tsconfig.json file. This ensures that null and undefined are only assignable to themselves and any. To enable strict null checks, add this to your tsconfig.json: { "compilerOptions": { "strictNullChecks": true } } ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-optional-chaining
JavaScript Optional Chaining - GeeksforGeeks
JavaScript Optional Chaining (ES2020) simplifies safe access to deeply nested object properties by preventing errors when values are null or undefined.
Published June 22, 2020
W3Schools
w3schools.com › nodejs › nodejs_es6.asp
Node.js ES6+ Features
Optional chaining lets you access deeply nested object properties without worrying about null or undefined values in the chain.
JavaScript Tutorial
javascripttutorial.net › home › javascript tutorial › javascript optional chaining operator
JavaScript Optional Chaining Operator (?.)
December 17, 2023 - The optional chaining operator (?.) is like a shortcut for accessing nested properties in a series of objects. Instead of having to check if each step in the chain is empty (null or undefined), you can use the operator ?.
Stack Overflow
stackoverflow.com › questions › 75322578 › how-do-you-get-data-showing-with-typescript-optional-chaining
How do you get data showing with TypeScript Optional Chaining - Stack Overflow
"If someone can give me a good understanding on how it works both ways" — This is just a combination of some super-basic bits of JS (if, object properties, function calls, and variables) and the optional chaining operator which is what the tutorial you are reading is trying to teach you.
W3Schools
w3schools.com › typescript › typescript_null.php
TypeScript Null & Undefined
Optional chaining is a JavaScript feature that works well with TypeScript's null handling.
TypeScript
typescriptlang.org › play › 3-7 › syntax-and-messaging › optional-chaining.ts
TypeScript: Playground Example - Optional Chaining
const artistBio = album?.artist?.bio; ... values (e.g. an empty string, 0, NaN, and, well, false). Optional chaining will only take null or undefined as a signal to stop and return an undefined....
TypeScript
typescriptlang.org › docs › handbook › release-notes › typescript-3-7.html
TypeScript: Documentation - TypeScript 3.7
At its core, optional chaining lets us write code where TypeScript can immediately stop running some expressions if we run into a null or undefined. The star of the show in optional chaining is the new ?. operator for optional property accesses.
Swift.org
docs.swift.org › swift-book › LanguageGuide › OptionalChaining.html
Optional Chaining - Documentation | Swift.org
This content has moved; redirecting to the new location · This page requires JavaScript. Please turn on JavaScript and refresh the page
Codecademy
codecademy.com › docs › javascript › optional chaining
JavaScript | Optional Chaining | Codecademy
August 7, 2025 - The optional chaining operator allows safe access to nested object properties or methods without having to explicitly check if intermediate properties exist.
TC39
tc39.es › proposal-optional-chaining
Optional Chaining
OptionalChain. Let newReference be ? ChainEvaluation of optionalChain with arguments baseValue and baseReference.
GitHub
github.com › tc39 › proposal-optional-chaining
GitHub - tc39/proposal-optional-chaining
Let’s call Optional Chain an Optional Chaining operator followed by a chain of property accesses, method or function calls.
Starred by 4.9K users
Forked by 72 users
Languages HTML 97.2% | Shell 2.8%