Hey just been wondering this for a while , when I have an if statements with a ton of || in it. This is a super super simple example but obviously there will be more variables etc.
The list sometimes will go on for a longggg way I am just wondering weather in coding practice thats fine or if there is a "proper" way to break up the code to make it more readable/easier to work with?
Wrap the logic inside a boolean function, assuming you won't have a similar problem by having to pass in a ton of arguments.
Wherever you actually do the 'if' statement, remember that whitespace is your friend!
I've found that the need for these kinds of if statements are rare and if you find yourself having to write one, it's a bigger sign of a design problem.
That said... in the few times I actually DO have to do something like this I tend to split up things on multiple lines: