how to add items to a list DOM code example
Example 1: appendchild javascript
const parent = document.createElement('div');
const child = document.createElement('p');
const childTwo = document.createElement('p');
parent.append(child, childTwo, 'Hello world');
parent.appendChild(child, childTwo, 'Hello world');
Example 2: appendchild javascript
const parent = document.createElement('div');
const child = document.createElement('p');
parent.append(child)
parent.appendChild(child)
parent.append('Hello world')
parent.appendChild('Hello world')