HTML file can't link to JS file

typical files not linking, using the same format I have before that did work.
files are in the same folder, function works in the html between script tags, but moved into the JS it cant find it anymore. Here is the setup:
Files in same folder:

Function is called:
Live, showing JS error:

each answer i google, shows the same setup that i already have being valid, i have tried using path, relative path, neither change it. VS code does recognize the js file and will auto fill it, its there. also tried using the sheet = syntax and language = syntax to no avail.

googled the error, doesn’t make sense and any answers i found were not even related to linking a file.

have you try to put your js script tag at the end of your html,just before the closing tag of body? just in case

yes and it works there for the function, the map call is currently there now.

cool !! so there is no more problem ?

well there is no problem if i keep the initMap function in script tags, but its supposed to be neatly in the JS file instead. BUT, when i move it there, it cant find it. All the other functions i have in there now all work, just that one cant be found in the JS file when called. so weird.