Create and Append a List Item
hardQuestion 74An empty unordered list has id="list". Create a new <li> element, set its text to 'New item', and append it to the list.
Platform-Provided HTML (READ-ONLY):
<ul id="list"></ul>Expected output
<ul id="list"><li>New item</li></ul>= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics
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.