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

20 lines
295 B
Markdown

importance: 5
---
# Clear the element
Create a function `clear(elem)` that removes everything from the element.
```html run height=60
<ol id="elem">
<li>Hello</li>
<li>World</li>
</ol>
<script>
function clear(elem) { /* your code */ }
clear(elem); // clears the list
</script>
```