I understand that the expression:
return A ? B : C
translates to
If A is true, return B; otherwise, return C
But how should I interpret the following:
return A ? B ? C : D : E
This code is not mine; I simply want to comprehend it.
I came across this answer/solution, which mentions that "Javascript is right-associative, so you 'resolve' the ternaries from right to left," but I still seek further clarification.