Skip to content

Commit

Permalink
adding logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Bakomihalis committed Oct 25, 2024
1 parent af248dd commit d44a933
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions node-parents-children/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ function renderPage(mapped) {

}

function renderList(element, nodes){
clearList(element);
console.log(nodes);
function renderList(listElement, nodes){
console.log("list element", listElement);
clearList(listElement);
console.log("nodes", nodes);
}

function clearList(list) {
while (list.firstChild) {
list.removeChild(list.firstChild);
function clearList(listElement) {
while (listElement?.firstChild) {
listElement.removeChild(listElement.firstChild);
}
}

Expand Down

0 comments on commit d44a933

Please sign in to comment.