I have a set of numbers & my requirements is to find same or nearest higher number to a specific variable set/object of numbers
var person = { A:107,
You just need to change your line
if (d > 0 && d < diff) {
to
if (d >= 0 && d < diff) {
so it includes the numbers that are equal as well.