Friday, January 14, 2022

Optional Chaining Operator#blog.jim-nielsen.com

An interesting example of how something as simple as the optional chaining operator

// user has no address
let user = {}; 
// undefined (no error)
alert(user?.address?.street);

can bring down an entire website when users don't have access to the latest browsers.