Is there anyway to call multiple end statement
Like I have a for loop and an if-else statement so can I do two ends together like end[2]
or end*2
My statement is: a.each do |i| if i<0 then l+=1 elsif i>0 then s+=1 else h+=1 end end
Here you can see there are two end statements can I turn them into one and shorten the code.
Thanks in Advance :)