Write and Run ES6 Code in the Browser

Include the following code in the page.

<!-- Write these first. Here `bootstrap.js` doesn't mean Twitter Bootstrap. -->
<script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script>
<script src="https://google.github.io/traceur-compiler/src/bootstrap.js"></script>

<!-- Edit the src. Write `type="module"` (important) for linked script -->
<script src="app.js" type="module"></script>

<!-- Remember to write `type="module"` for embedded script -->
<script type="module">
    //→ write your script here

See: Traceur Compiler Getting Started

Demo: ES6 Demo Repo Source