I'm looking for a way to know all the positions of a certain part of a string, so for example, if I have a let variable = "test"
and I want to know the location of all the "t"s.
I tried using indexOf(), but it does only return the location of the first "t" and stops afterwards.
Is there a way to do this with all "t"s?