How to convert a function definition as string to code in JavaScript

  Just a snippet for converting a function as string to code:   Code <!doctype html><html><head>    <meta charset=”utf-8″ />    <meta http-equiv=”x-ua-compatible” content=”ie=edge”>    <title>Research</title>    <meta name=”description” content=”A page to quickly spike some code or styling.”>    <meta name=”viewport” content=”width=device-width, initial-scale=1″>    <link rel=”icon” href=”data:;base64,iVBORw0KGgo=”>        <style>            </style></head><body>    <script>        // Define a function …

ES6 modules

Just some reminders, when working with ES6 modules: ES6 modules are automatically strict-mode code, even if you don’t write "use strict"; in them. When you run a module containing an import declaration, the modules it imports are loaded first, then each module body is executed in a depth-first traversal of …