Javascript: Find The Closest Number In Array To A Specific Value