-
Notifications
You must be signed in to change notification settings - Fork 3
/
63 import.html
31 lines (30 loc) · 1.07 KB
/
63 import.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
visit : <a href="https://www.w3schools.com/js/js_modules.asp" target="_blank">Click Here</a>
<script type="module">
//we can export program and use it in another program
//example we have here function contact which is inside 63.1 Export.js
//and we can use it here in 63 import.html
import contact from "./63.1 Export.js";
import {id,address,fullName as name,batch,getAddress} from "./63.1 Export.js";
contact("muazim", "muazim@gmail.com");
console.log(id);
console.log(address);
console.log(name);
console.log(batch)
getAddress(name,address)
/*
Modules:
JavaScript modules allow you to break up your code into separate files.
This makes it easier to maintain a code-base.
Modules are imported from external files with the import statement.
*/
</script>
</body>
</html>