Multiple file management in JQUERY application

64 Views Asked by At

How should Split JQUERY with multiple files or access variable inside one

file1.js

jQuery(document).ready(function($) {
   var a='Ram';
});

file2.js

jQuery(document).ready(function($) {
   console.log(a);
});

Order of inclusion in html, file1.js file2.js

Its not working, I want to make it work, How do I go about.

0

There are 0 best solutions below