Skip to content

Instantly share code, notes, and snippets.

@ilearnjavascript
Created March 27, 2019 23:45
Show Gist options
  • Save ilearnjavascript/70dc1a9c02d0a3b34f096b16d44afb09 to your computer and use it in GitHub Desktop.
Save ilearnjavascript/70dc1a9c02d0a3b34f096b16d44afb09 to your computer and use it in GitHub Desktop.
es6 - modules - 3.js
// named import
import { module1, module2, module3 } from './modules.js/index.js';
document.body.insertAdjacentHTML('beforeend', '<div>' + module1 + '</div>');
document.body.insertAdjacentHTML('beforeend', '<div>' + module2 + '</div>');
document.body.insertAdjacentHTML('beforeend', '<div>' + module3 + '</div>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment