August 15, 2018

optional chaining in javascript

Key Takeaways

Imaging if you need to access deep level of property and you are not sure that if such properties exists deep down, you are doing something like books &&amp...

Imaging if you need to access deep level of property and you are not sure that if such properties exists deep down, you are doing something like

books && books.book && books.book.authors && books.book.authors.author

This is really difficult to read and understand sometime. there is something called optional chaining in javascript proposal which you can use if you include in babel-plugin-proposal-optional-chaining to your babebl.

The sytax is really easy using

?.
books?.book?.authors?.author

all you need is chain the child properties, now everything is so much easier to read.

Vibe Code to Glory - Side Projects 2026

AI Banana Flow

Web App

Check out this project

AI Banana Flow is an AI Image Generator with Visual Flow Editor. It allows users to create stunning AI-generated images through an intuitive visual flow editor. Connect prompts, generate images, and build creative workflows with the power of AI. Experience a new paradigm of creative freedom with precision control and visual workflow management.

Category: AI Image Generation

AI Banana Flow - AI Image Generation Web application by Max Li Bin

AI Banana Flow

Web

SG Passport Photo - Utility Web application by Max Li Bin

SG Passport Photo

Web

MyPhotoAI - Photography iOS application by Max Li Bin

MyPhotoAI

iOS

Interior AI: Room Designer - Design iOS application by Max Li Bin

Interior AI: Room Designer

iOS