Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js import and export

// helloworld.js

export function helloWorld() {
	return 'Hello World!';
}

// main.js

import helloWorld from './helloworld.js';

console.log(helloWorld());
 
PREVIOUS NEXT
Tagged: #js #import #export
ADD COMMENT
Topic
Name
6+5 =