i want create an program using javascript, but i want my file be more organize, is there some way that i can implement the concept of include or require of php. example: javascript file that only contains function let say function.js, then another javascript file main.js. is there a way that in main.js i can call a function in the function.js?
function.js
function test(){
alert("hello world");
}
main.js
$(document).ready(function(){
test();
});