html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='initial-scale=1.0'>
<title>Lesson 2</title>
<script src='https://code.jquery.com/jquery-3.2.1.min.js'></script>
</head>
<body>
<div id='container'>
<div id='main'>
<div id='line'>1</div>
<div id='line-border'></div>
<div id='source'><div id='source-content'><span class='cursor'>|</span></div></div>
</div>
<div id='out'>
<p>Output</p>
<div id='output'> </div>
</div>
<div id='controls'>
<svg width='70' height='70'>
<defs>
<mask id='play' x='0' y='0' width='70' height='70'>
<path d='M10,10v50l43.3,-25z'
style='fill:#777; stroke:none;'/>
</mask>
<mask id='pause' x='0' y='0' width='70' height='70'>
<rect x='15' y='10' width='15' height='50'
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
* {
box-sizing: border-box;
}
body {
margin: 0px;
overflow: hidden;
font-size: 100%;
color: #ccc;
background-color: #3a3a3a;
}
#container {
position: relative;
overflow: hidden;
}
#controls {
position: absolute;
right: 0px;
bottom: 0px;
z-index: 2;
}
#main {
position: absolute;
top: 0px;
left: 0px;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
var isCallable = function (fn) {
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
};
var toInteger = function (value) {
var number = Number(value);
if (isNaN(number)) {
return 0;
}
if (number === 0 || !isFinite(number)) {
return number;
}
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
};
var maxSafeInteger = Math.pow(2, 53) - 1;
var toLength = function (value) {
var len = toInteger(value);
return Math.min(Math.max(len, 0), maxSafeInteger);
};
// The length property of the from method is 1.
return function from(arrayLike/*, mapFn, thisArg */) {
// 1. Let C be the this value.
var C = this;
// 2. Let items be ToObject(arrayLike).
var items = Object(arrayLike);
// 3. ReturnIfAbrupt(items).
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run