0

Whats wrong with these codes?...it gives no output

nums = [6, 3, 8, 7, 9] case nums when nums[0] == 3 + 3 puts "hi" when nums[1] > 5 puts "hello" when nums[2] != 8 puts "tsup" end

20th Apr 2017, 1:18 PM
Kelvine De Danielo
Kelvine De Danielo - avatar
1 Answer
0
how yo write a case sentence in Ruby.I hope this link helps you more http://stackoverflow.com/questions/948135/how-to-write-a-switch-statement-in-ruby nums=[6,3,8,7,9] nums=case when nums[0]==3+3 puts "hi"" when nums[1]>5 puts "hello" when nums[2]!=8 puts "tsup" end
20th Apr 2017, 2:53 PM
Ivan Taylor Hawkins
Ivan Taylor Hawkins - avatar