DEV Community

Discussion on: Optional Chaining in Javascript

dhilipkmr profile image
Dhilip kumar Author

Try catch for every prop check in my cod would reduce its readability for sure. So, I personally would prefer the former. But yes it is an alternative approach

ivanalejandro0 profile image
Ivan Alejandro

Yeah, I think that for this and many other things one of the most important things is what's easier to work with for you and your team :)