Help ! Functions !!!

Help ! Functions !!!

how to make A() execute after B() is executed !?

function A runs in A.js file wich is added to the page-b.html <head> :
<head><script src="A.js"></script></head>

function B runs inside page-B.html like this :
<script> B(); </script>