find the index of array by element 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