Hi,
usually when i do this:
x = [1,2,3,]
result = x.min
but let’s say I have a nested array
x = [ [1,“h”], [2,“c”]]
how to i just display the min value (1) and its pair value “h”
Hi,
usually when i do this:
x = [1,2,3,]
result = x.min
but let’s say I have a nested array
x = [ [1,“h”], [2,“c”]]
how to i just display the min value (1) and its pair value “h”
solved
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs