we have two js fie , test-1.js , test-2.js.
Adding this second answer because you changed the order to be correct, but then also changed the contents of the scripts. Since they both contain a $(document).ready(function() {...});
where you create the functions, this means the functions you create only exist in the scope of that function, e.g.
function foo() {
return 1;
}
$(document).ready(function() {
// this is a new scope, functions created here will not be accessible outside of it.
function bar() {
return 2;
}
});
foo(); // 1
bar(); // Error: undefined is not a function