Skip to content

Instantly share code, notes, and snippets.

@juniovitorino
Created June 23, 2018 22:36
Show Gist options
  • Save juniovitorino/35b4661344f12b6f2608f055590eae5d to your computer and use it in GitHub Desktop.
Save juniovitorino/35b4661344f12b6f2608f055590eae5d to your computer and use it in GitHub Desktop.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>JS Module in Browser</title>
<script type="module" src="./js/main.js"></script>
</head>
<body></body>
</html>
import { fullname } from './person.mjs';
document.body.innerHTML += `<h1>${ fullname('Junio', 'Vitorino') }</h1>`
export const fullname = (firstname, lastname) => `${firstname} ${lastname}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment