Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default function sum(x, y) {
- return x + y;
- }
- import { sum } from './mymodule';
- window.onload = function () {
- const result = sum(2, 3);
- console.log(result);
- };
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>App2</title>
- <link href="css/default.css" rel="stylesheet" />
- </head>
- <body>
- <div>Content goes here!</div>
- <script src="js/main.js" type="module">
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment