Safer property access with Lodash's 'get' method

Shane Osbourne
InstructorShane Osbourne

Share this video with your friends

Send Tweet

Property access in Javascript can be problematic - especially when dealing with nested Objects and Arrays. Doing it manually and in a safe manner requires tons of boilerplate inside conditionals and results in a defensive style of coding. In this lesson we look at why this is a problem & how to overcome it using the get method from the popular utility library Lodash

Michał Śnieżyński
Michał Śnieżyński
~ 2 years ago

Amazing tip! I had many times errors of this type and now I know how to write cleaner code.