JavaScript executes globally. Adding both scripts on the page makes them available to each other as if they were in one file.
<script src="1.js"></script>
<script src="2.js"></script>
However, you should note that JavaScript is parsed "linearly" and thus, "first parsed, first served". If the first script needs something in the second script, but the second script hasn't been parsed yet, it will result in an error.
If that happens, you should rethink your script structure.