Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    I get error: Type 'Set<string>' is not an array type.
    – gattsbr
    Commented Jul 14, 2016 at 14:34
  • 3
    And if you for some reason don't want to use the spread operator, there's also: Array.from(new Set(array1.concat(array2))).
    – kba
    Commented Nov 23, 2017 at 16:20
  • @gattsbr, with TypeScript in tsconfig.json, you can add "downlevelIteration": true to compilerOptions.
    – Vince
    Commented May 28, 2019 at 12:11