Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

conditional operator in ruby

#condition ? true : false
apple_stock > 1 ? :eat_apple : :buy_apple
<div class="open_grepper_editor" title="Edit & Save To Grepper"></div>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #conditional #operator #ruby
ADD COMMENT
Topic
Name
4+8 =