Write closest_to(nums, target) returning the number closest to target; on a tie, the smaller number.
closest_to(nums, target)
target
closest_to([1, 5, 9], 6) → 5
closest_to([4, 6], 5) → 4
Submit runs 4 tests, including hidden edge cases.
Run your code to see the output here.