Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 369 Bytes

play-with-tri-expression.md

File metadata and controls

20 lines (13 loc) · 369 Bytes

Play with tri-expression

条件 ?处理1:处理2

条件:逻辑表达式,返回bool类型值 处理1:当条件为时执行 处理2:当条件为时执行

point =2800 
if point ==2800 then
	puts "uzi"
else 
	puts "other"
end
puts point ==2800? "uzi":"other"

tri-expression