export javascropt code example
Example 1: import modules js html
<script type="module" src="main.js"></script>
Example 2: js import and export
// helloworld.js
export function helloWorld() {
return 'Hello World!';
}
// main.js
import helloWorld from './helloworld.js';
console.log(helloWorld());