Ternary operator plurality of conditional wording

a == 1 ? 10 :(a ==2 ? 20 :'未知')

Guess you like

Origin www.cnblogs.com/cherishnow/p/11301681.html