The good news: there is a simple rule you can use instead of understanding all this. The simple rule? Write simple code.
Don't write multiple assignments in a single statement. Don't overuse the ternary operator (?:). Don't overdo it with assignment inside larger statements like comparisons. These "don'ts" will make your code clearer to humans and you are much, much less likely to wind up with holes in your feet.