I would also consider how those three approaches handle different type values.
For example Approach 2 will not handle objects well (objects as computed properties), and will throw if you pass something that can't be converted to a string, i.e. Object.create(null). Approach 1 will fail with NaN values, it will falsely report [NaN, NaN] as unique.
Approach 3 is the one I would use, or a mix of Approach 2 and 3 (using a set, or preferably a weak set as a caching tool).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would also consider how those three approaches handle different type values.
For example Approach 2 will not handle objects well (objects as computed properties), and will throw if you pass something that can't be converted to a string, i.e. Object.create(null). Approach 1 will fail with NaN values, it will falsely report [NaN, NaN] as unique.
Approach 3 is the one I would use, or a mix of Approach 2 and 3 (using a set, or preferably a weak set as a caching tool).