Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • DigitalOcean
  • DO Community
Search

Articles Tagged
optional chaining

2 Articles
{
,

}
Direct link to the article The Optional Chaining Operator, “Modern” Browsers, and My Mom
optional chaining progressive enhancement

The Optional Chaining Operator, “Modern” Browsers, and My Mom

Direct Link

Jim Nielsen’s mom couldn’t open a website. Jim worked on confirming the issue and documented how he got to the bottom of it:

“[…] well it can’t be a browser issue. It’s not like my Mom is using Internet Explorer!

…
Avatar of Chris Coyier
Shared by Chris Coyier on Feb 1, 2022
!important optional chaining

Web Technologies and Syntax

Direct Link

JavaScript has a (newish) feature called optional chaining. Say I have code like:

const name = Data.person.name;

If person happens to not exist on Data, I’m going to get a hard, show-stopping error. With optional chaining, I can …

Avatar of Chris Coyier
Shared by Chris Coyier on Sep 24, 2020

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • DigitalOcean
  • DigitalOcean Community
  • About DigitalOcean
  • Legal
  • Free Credit Offer
CSS-Tricks
  • Email
  • Guest Writing
  • Book
  • Advertising
Follow
  • Mastodon
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • iTunes
  • RSS
Back to Top