I have a question and I hope that one of you can help me: I need to find the positions of an element in an array. For example:
var elements: [String] = ["a","b","c","a","c"]
var element = "a"
I need to know in what positions is the element, in this case 0,3
I have tried with some nested for loops but it was a mess, can you help me?
Thanks