CJCoding With Joseph
15free / daySign inCreate account

Create and Append a List Item

An empty unordered list has id="list". Create a new <li> element, set its text to 'New item', and append it to the list.

Expected Output:

<ul id="list"><li>New item</li></ul>

= newline. No newline after the last line.

Hints4 available
Topics:
HTML DOM
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.