Say I got a set of 10 random numbers between 0 and 100.
An operator gives me also a random number between 0 and 100. Then I got to find the number in the set that is the closest from the number the operator gave me.
example
set = {1,10,34,39,69,89,94,96,98,100}
operator number = 45
return = 39
And how do translate this into code? (javascript or something)