Enter a ZIP code

fetch('https://api.zippopotam.us/us/$(vendorData.zip)') then(response =>{ if (!response.ok) { throw new Error('Zip code not found in API'); } return response.json(); }) then(data => { const place = document.getElementByID('result').innerHTML +=

Location Details:

City: ${place['place name']}

State: ${place['state']}

; }) catch(error => { document.getElementByID('result').innerHTML =

${error.message}

; })