Append a List Item

DOM Manipulation ยท easy

The page has an empty `<ul id="list">`. Write JavaScript that appends exactly one `<li>` with the text `Item` to it.

Hints
  • Use document.createElement to make the element.
  • Set textContent before appending.

Learning resources

Loading...

Run your code to see results.