ruby get index of array value code example
Example: ruby find index of element in array
a = [ "a", "b", "c" ]
a.index("b") #=> 1
a.index("z") #=> nil
a = [ "a", "b", "c" ]
a.index("b") #=> 1
a.index("z") #=> nil