Skip to content

Instantly share code, notes, and snippets.

@crisberrios
Last active February 4, 2016 19:16
Show Gist options
  • Save crisberrios/34732dafe50b40bd5993 to your computer and use it in GitHub Desktop.
Save crisberrios/34732dafe50b40bd5993 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNext Bin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
<div id="app"></div>
</body>
</html>
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
const Link = (href, children) => (
`<a href="${href}">${children}</a>`
);
const parent = document.querySelector('body');
parent.innerHTML = Link("/","Home");
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"react": "0.14.6",
"react-dom": "0.14.7"
}
}
"use strict";
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
var Link = function Link(href, children) {
return "<a href=\"" + href + "\">" + children + "</a>";
};
var parent = document.querySelector('body');
parent.innerHTML = Link("/", "Home");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment