re: Optional Chaining in Javascript VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Another alternative to: const hasWorld = response && response.data && response.data.msg && response.data.msg.includes('wo...
 

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

 

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 :)

code of conduct - report abuse