i'm following along a book and I have 2 javascript files. Both are in the HTML file as:
<script src="playlist_store.js"></script>
<script src="playlist.js"></script>
however, when I try to call a function from playlist_store.js inside of playlist.js chrome debugger says "uncaught reference error. loadPlaylist is not defined. loadPlaylist() is the function from playlist_store.js
I thought there might be a typo somewhere but I don't think there is. Does playlist.js actually need to somehow import or include / require the playlist_store.js ? Is the browser not smart enough to somehow link them so the functions in one you can call from another?
playlist_store.js. You don't have to do any importing. IfloadPlaylistis actually defined as a function in reachable scope, it should work.