DEV Community

Discussion on: 🛡️ How to safely access deeply nested values in javascript?

Collapse
 
tbetous profile image
Thomas Betous

It depends on what you want to do but I'd say in most cases I agree with you. Generally it's better to check data. I'd even say it's not a bad thing to let you code throws an exception because at least you can see that functionnaly there is something wrong with your code.

Thanks for your comment !