Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
sort solution in Clear category for Nearest Value by lolucky
var nearestValue=(v,s)=>v.sort((a,b)=>a-b).sort((a,b)=>Math.abs(a-s)-Math.abs(b-s))[0]
Aug. 26, 2020
Comments: