Returns the closest number out of an array.
The array to search in.
The number to search for the closest to.
// Returns 10getClosestNumber([0, 10, 20], 12); Copy
// Returns 10getClosestNumber([0, 10, 20], 12);
Returns the closest number out of an array.