get index of an element in an array in ruby 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