initMap is not a function
<p>I can't understand what is the problem? I used this example from Google Map APIs: <a href="https://developers.google.com/maps/documentation/javascript/examples/map-simple" rel="nofollow noreferrer">Simple Map</a></p>
<pre><code>&lt;body&gt;
   &lt;!-- Map Section --&gt;
   &lt;section id=&quot;map&quot;&gt;&lt;/section&gt;

   &lt;script src=&quot;js/jquery.min.js&quot;&gt;&lt;/script&gt;
   &lt;script src=&quot;js/main.js&quot;&gt;&lt;/script&gt;
   &lt;script src=&quot;https://maps.googleapis.com/maps/api/js?key=AIzaSyB5Y8CqFe-4Egzl5TlPqlFvjRGcuCfHGvY&amp;callback=initMap&quot; async defer&gt;&lt;/script&gt;
   
&lt;/body&gt;
</code></pre>
<p>main.js:</p>
<pre><code>//--------------------------------------------------
// Contact Map
//--------------------------------------------------
function initMap() {    
    if ($(&quot;#map&quot;).length &gt; 0)
    {
        var map;
        map = new google.maps.Map(document.getElementById('map'),{
            center: {lat: 44.4297538, lng: 26.0649221},
            zoom: 16,
            scrollwheel: false,
            zoomControl: false,
            panControl: false,
            streetViewControl: false,
            mapTypeControl: false,
            overviewMapControl: false,
            clickable: false
        });
        
    }
}
</code></pre>
<p>Error:</p>
<blockquote>
<p>message: &quot;initMap is not a function&quot;</p>
<p>name: &quot;InvalidValueError&quot;</p>
</blockquote>