I want to make my condition easier to read and wandering if it is possible to simplify this Scenario:
if((x === y)||(x === z)){...}
//and this one:
x = (x === y) || (x === z)? ... : ...;
//To something like:
if(x === (y || z)){...}
x = x === (y || z) ? ... : ...;
This would get rid of the tons of brackets and variable duplication as well as "sounding" logical (at least for me): if this var x is this or that then I do this.
Especially when x is some long object reference e.g.:
this.someObject.KeyOfKeys[200].language === this.someOtherObject.KeyY.languages[10] || ...;
Or how do you deal with logical "easy" but cumbersome to write conditions?