I'm creating a website and on this website I need to add a map and the user can type any address and it will return the closest place out of a list of places. I have the API imported to my code, but I'm not a very skilled JavaScript programmer so I have no idea how to create this funcionallity. From what I've searched, it has to loop through an array of places to find the closest one.
Does anyone have any clue? Thank you in advance.