If you stumble across something like this in a large codebase when you need to get something implemented/fixed quickly, it's a bloody nightmare.
Takes ages to grasp the context of what this kind of code is trying to do. It's always worth putting each sub-condition in a named boolean constant.
e.g. const doesProfileExist = ...
And then using a fail-fast if statement straight after.
e.g. if (!doesProfileExist) return x
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you stumble across something like this in a large codebase when you need to get something implemented/fixed quickly, it's a bloody nightmare.
Takes ages to grasp the context of what this kind of code is trying to do. It's always worth putting each sub-condition in a named boolean constant.
e.g. const doesProfileExist = ...
And then using a fail-fast if statement straight after.
e.g. if (!doesProfileExist) return x