Last active
October 28, 2019 06:01
-
-
Save remoharsono/6324054323c0ae6fa45b613a942e6ac8 to your computer and use it in GitHub Desktop.
Tutorial Penggunaan ES6 Module, Part 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>.</title> | |
| <script type="module" src="main.js"></script> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { perkalian as kali } from './util.js'; | |
| console.log(kali(2,5)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function perkalian(satu, dua) { | |
| return satu * dua; | |
| } | |
| function penambahan(satu, dua) { | |
| return satu + dua; | |
| } | |
| export { perkalian, penambahan }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment