s24344,
const arrayNumbers = [-5, 0, 5, 10, 15, 20, 25, 30, 35];
const n = 23.45;
const k = 11.38;
const res = (a, b, c) => (b = a.map(a => Math.abs(a - b)), c = Math.min(...b), b = b.findIndex(a => a === c), a[b]);
const fn = res.bind("",arrayNumbers);
alert(JSON.stringify([n, k].map(fn)));