re: 5 Programming Patterns I Like VIEW POST

FULL DISCUSSION
 

For nested ternaries we can use self-executable loops:

{ (() => {
if(x) {
//do something...
console.log(''x')
}
if(y) {
//do something...
console.log(''x')
}
if(z) {
//do something...
console.log(''x')
}
}
)()
}

code of conduct - report abuse