Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How do I include a JavaScript file in another JavaScript file?

<script type="module">
  import { hello } from './hello.mjs'; // Or the extension could be just `.js`
  hello('world');
</script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #include #JavaScript #file #JavaScript
ADD COMMENT
Topic
Name
8+4 =