Answers for "ruby inline if"

3

ruby if statement one line

if_condition ? if_statement : else_statement
Posted by: Guest on October-30-2020
0

ruby shorthand if

today == ChristmasEve ? (puts "Santa's On His Way!") : (puts "Snow")
Posted by: Guest on September-04-2020

Browse Popular Code Answers by Language