Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
optional chaining

2 Articles
{
,

}
Image
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

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!

…
Image
Chris Coyier on Feb 1, 2022
Image
Direct link to the article Web Technologies and Syntax
!important optional chaining

Web Technologies and Syntax

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 …

Image
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
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top
Advertisement