Based on my reading of https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set-objects and looking at Safari 8 / iOS 8's behavior, Set(...) and new Set(...) should behave differently. Specifically. Set(...) called as a function optionally takes an iterable while new Set(...) called as a constructor takes variable arguments.
Safari 8 (10600.1.8) native Set implementation:
> a = [...new Set(1, 2, 3)]
[1, 2, 3]
> a = [...new Set([1, 2, 3])]
[Array[3]]
Based on my reading of https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set-objects and looking at Safari 8 / iOS 8's behavior,
Set(...)
andnew Set(...)
should behave differently. Specifically.Set(...)
called as a function optionally takes an iterable whilenew Set(...)
called as a constructor takes variable arguments.Safari 8 (10600.1.8) native Set implementation: