Example 1 — Official: Math.floor
Floats collapse when their floors match; the first value wins.
_.unionBy([2.1], [1.2, 2.3], Math.floor);
// → [2.1, 1.2] How It Works
- Project.
floor(2.1)=2→ keep2.1. - New key.
floor(1.2)=1→ keep1.2. - Duplicate key.
floor(2.3)=2already seen → skip. - Iteratee last.
Math.flooris the final argument.

