Inserting HTML

Report a typo

There is a list of products on the webpage:

<ol id="products">
  <li>Home robot</li>
  <li>Ultra slim smartphone</li>
  <li>Quantum computer</li>
</ol>

Insert a new list item with the text Supersonic car at the end of the product list. The variable for the list is already created below:

let productList = document.getElementById("products");

Use the existing variable and a single line of code.

Enter a short text
___

Create a free account to access the full topic