local thing = condition and if_true or if_false ---------------等价于--------------- local thing = nil if condition then thing = if_true else thing = if_false end