I have read a file in to a list, the format of the file for example is:
blue
yellow
green
red
and now i want to find the location (index) of item "green" if done correctly the result would be "3" as it is the 3rd item in the list.
maybe I'm not good at searching google but I couldn't find a solution anywhere :/ so the whole idea of this is:
if (item.exists(List, "green")) {
index = indexOf(List, "green")
}
First i must know if it exists before I get the index of it. Also I'm trying to do this without having to make any new functions that I would have to call.
thanks for any help