constresponseOne=awaitmethodOne();if(responseOne.error)returnconstresponseTwo=awaitmethodTwo();if(responseTwo.error)return// of if you want destructuringconst{error:methodOneError,result:resultOne}=awaitmethodOne();if(methodOneError)returnconst{error:methodTwoError,result:restultTwo}=awaitmethodTwo();if(methodTwoError)return
Im not saying the array descructuring is worse, its just a prefference
A skilled software engineer, talented problem-solver and team player with a passion for using technology to solve complex problems and constantly seeking out new challenges to advance my skills👨🏼💻
A skilled software engineer, talented problem-solver and team player with a passion for using technology to solve complex problems and constantly seeking out new challenges to advance my skills👨🏼💻
a few ways you could avoid this:
Im not saying the array descructuring is worse, its just a prefference
You can rename the variable when destructuring an object.
@jsnanigans Yeah, It's just a preference.
@erikhofer I am aware of that.