en.javascript.info/2-ui/1-document/07-modifying-document/4-clear-elem/task.md
Ilya Kantor dbf5c7587c minor
2017-03-13 00:21:00 +03:00

295 B

importance: 5


Clear the element

Create a function clear(elem) that removes everything from the element.

<ol id="elem">
  <li>Hello</li>
  <li>World</li>
</ol>

<script>
  function clear(elem) { /* your code */ }

  clear(elem); // clears the list
</script>