Sets don't come with the same prototype functions as arrays. They have a forEach method, but no map or filter, for example (I think). The spread operator and square braces there are simply extracting the values from the set and turning them into an array.
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.
Sets don't come with the same prototype functions as arrays. They have a
forEach
method, but nomap
orfilter
, for example (I think). The spread operator and square braces there are simply extracting the values from the set and turning them into an array.