Search closest next value in javascript array
<p>I have a javascript array like <code>var test = [2,5,8,12,56];</code> and now I want to search the closest next value of 9. So the output is 12 in this case (and not 8!).</p>
