3 ms·
Using document.createElement to create elements and element.appendChild(node) to add them is tedious. But once you have abstractions in place, like var menu = c
by z3t4 7y ago
Using document.createElement to create elements and element.appendChild(node) to add them is tedious. But once you have abstractions in place, like var menu = createMenu(), subMenu=createMenu(), menu.add(subMenu) it becomes very powerful and more fun to work with the DOM.