I am curious about if a logical representation exists for ternary operator that gives the same result for each condition combination. I tried below but it doesn't cover all situations. Is there a correct representation for this problem?
Ternary Condition : a ? b : c
Logical Version : (a && b) || c
Logical version fails in one condition compared to ternary results when the conditions below are given:
(true && true) || true = true
(true && true) || false = true
(true && false) || true = true //must be false
(true && false) || false = false
(false && true) || true = true
(false && true) || false = false
(false && false) || true = true
(false && false) || false = false