I am wondering how can I calculate my coordinates to an array of coordinates and find out which one is closest?

Lets say:

```js
var player = {
  x: 10,
  y: 20
}

var box = [
  {x: 17, y: 30},
  {x: 41, y: 14},
  {x: 20, y: 30}
];
```

So my player stays on 10, 20. And i have 3 different boxed, and i need to find out which one is closest. Is there any easy way to caluculate that?