(a = --b ? b : (b = -99))
here, because =
and ?
have the same priority (15 according to the link provided) and are evaluated from right to left, it is executed as follows:
a = --b ? b : (b = -99)
1. --b ( =0)
2. 0?
3. 0 so not what is immediately after ? but what is after :
4. b=-99 (evaluate second expression)
5. a = -99 (assign the result of expression)