I am trying to convert html and javascript code to an external code file that the html file can execute.
Here is the code in HTML:
function initMap() {
var mapDiv = document.getElementById('map');
var map = new google.maps.Map(mapDiv, {
center: {lat: 44.540, lng: -78.546},
zoom: 8
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
I know how to place the function into the external javascript code file, but my problem is how do I place the second script tag into external javascript?