Unique Values Across Two Arrays I
Concatenate two arrays and keep every value once, in first-seen order: union(a, b).
union([1, 2, 2, 3], [3, 4]) // [1, 2, 3, 4]
Values are numbers and strings, and 1 and "1" are different values.
Hints
Hint 1
union is a Set over both arrays, and a Set keeps insertion order.
Topics
Asked at
Sign in to use the assistant — ask what the problem means, get a hint when you're stuck, or have your current work reviewed. Conversations save to your account.