Skip to content

Instantly share code, notes, and snippets.

@balanceiskey
Created February 12, 2016 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balanceiskey/c2a195ea842244c0227a to your computer and use it in GitHub Desktop.
Save balanceiskey/c2a195ea842244c0227a to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
// write ES2015 code and import modules from npm
// and then press "Execute" to run your program
import _ from 'lodash';
const list = [
'one',
'two',
'three',
'four',
];
_.each(list, (item) => {
const span = document.createElement('span');
span.innerText = item;
document.body.appendChild(span);
});
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"lodash": "4.0.0"
}
}
'use strict';
var _lodash = require('lodash');
var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var list = ['one', 'two', 'three', 'four']; // write ES2015 code and import modules from npm
// and then press "Execute" to run your program
_lodash2.default.each(list, function (item) {
var span = document.createElement('span');
span.innerText = item;
document.body.appendChild(span);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment