I have 4 javascript files (each for a single HTML file) and 3 functions are THE SAME in all 4 files.
I’d like to find a smooth solution that I could somehow include these 3 functions separately… is it possible to include .js within a .js?
I have 4 javascript files (each for a single HTML file) and 3 functions
Share
You can have multiple
<script>tags:You can use jQuery:
You can use a pre-processor like browserify or YUICompressor or Google’s Closure Compiler.