gistlib
other ruby categories
conditional-statements code snippets in ruby
case when in ruby
i have an array [1,2,3]. and my input to function arg is n. if n is either 1 or 2 or 3, do sth. if n is a number not in that array, do sth else. give me the code. in ruby
write me this program: "if they printed a brown band (value 1) followed by a green band (value 5), it would translate to the number 15." in ruby
gistlib
by LogSnag