GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Monday, December 20, 2010

Flow Control In Ruby

Simple expression in comparison:
>> puts 2<1         // result false
>> puts 2!=8       // result true

Use if:
>> if (9>8)
>> puts '9 is greater than 8'
>> puts 'Hope you happy' 
>> else
>> puts '9 is not greater than 8'
>> end

Share/Bookmark

No comments:

Post a Comment