I have two .js files:
Card_API.js script.js
I want to be able to call functions in Card_API.js from script.js.
My references in the HTML file look like this:
<script type="text/javascript" src="js/Card_API.js"><\script>
<script type="text/javascript" src="js/script.js"><\script>
in the Card_API.js file, I have a function:
function sortCardsByMana(array, reverse){
// Do Stuff
}
I want to be able to call the above function in the script.js file, but when I try it like this:
sortCardsByMana(cards, false);
...it gives an error saying that the function is not defined.
Can anyone tell me what I'm doing wrong or if I it's possible?