Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.