title: Get nearest point from another one in JavaScript
body: <p>Let's say I have a point, called <code>i</code>, which is </p>
  
  <pre><code>{
    x: 10000,
    y: 10000
  }
  </code></pre>
  
  <p>And I have some other points, in an array, something like:</p>
  
  <pre><code>[{
    x: 35,
    y: 10001
  }, {
    x: 2478,
    y: 38
  }, ...]
  </code></pre>
  
  <p>My question is, how to, in JavaScript, get the nearest point from <code>i</code>?
  Thanks!</p>