4 Ways to Safely Access Nested Objects in Vanilla Javascript

How to access nested objects and write safer code

Zeng Hou Lim
Better Programming
Published in
4 min readSep 7, 2019

--

Photo by Blake Connally on Unsplash

If you’re working with Javascript, chances are you might have encountered a situation where you have had to access a deeply nested object. If everything goes well, you get your data without any problems. That’s great!

--

--

Excited about living my best life and becoming a better engineer. I like taking complex ideas and breaking them down.