up
This commit is contained in:
parent
7b3f4550fd
commit
d85be5f17b
12 changed files with 47 additions and 93 deletions
|
@ -27,7 +27,7 @@
|
|||
container.innerHTML = createTreeText(obj);
|
||||
}
|
||||
|
||||
function createTreeText(obj) { // отдельная рекурсивная функция
|
||||
function createTreeText(obj) { // standalone recursive function
|
||||
let li = '';
|
||||
for (let key in obj) {
|
||||
li += '<li>' + key + createTreeText(obj[key]) + '</li>';
|
||||
|
@ -38,7 +38,6 @@
|
|||
return ul || '';
|
||||
}
|
||||
|
||||
let container = document.getElementById('container');
|
||||
createTree(container, data);
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue