html
html
1
2
3
4
5
6
7
8
9
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div class="a"></div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
body {
}
.a {
border: solid 1px black;
margin: 10px
}
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
const nestingDivs = (html,n = 5) => {
if(n === 0) return;
const div = html.cloneNode(true);
nestingDivs(html.appendChild(div), n - 1);
};
onload = () => {
const html = document.querySelector(".a");
nestingDivs(html);
};
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run