That is significantly slower though, the Set uses an O(1) lookup so the routine is O(N) whereas indexOf would make it O(N**2)
Nice to know. Will try that next time.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.