1function getCoordinates(address){
2 fetch("https://maps.googleapis.com/maps/api/geocode/json?address="+address+'&key='+API_KEY)
3 .then(response => response.json())
4 .then(data => {
5 const latitude = data.results.geometry.location.lat;
6 const longitude = data.results.geometry.location.lng;
7 console.log({latitude, longitude})
8 })
9}
10