Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Import A Function From A Module In JavaScript


export const add = (x, y) => {
    return x + y
}


	import {add} from '/javascripts/test.js';
	
	window.onload = function()
	{
		
	console.log(add(1, 1));
	}
    
    /*returns 2*/
 
PREVIOUS NEXT
Tagged: #Import #A #Function #From #A #Module #In #JavaScript
ADD COMMENT
Topic
Name
6+6 =