Implement a function unionBy(arrays, iteratee) that merges multiple arrays into one, keeping only unique values, determined by a transformation function or property name.
The function should:
iteratee.Examples
unionBy([[2.1], [1.2, 2.3]], Math.floor); // [2.1, 1.2] unionBy([[{ x: 1 }], [{ x: 2 }, { x: 1 }]], 'x'); // [{ x: 1 }, { x: 2 }]
JavaScript Function
No test results yet
Click "Run" to execute tests