Skip to main content

Exercise 30

  • Create the following folder/file structure:
/ex_30
|-- index.html

index.html

  • Create a basic HTML document
  • Create a script tag on the document head element
  • Add the following html code
<!DOCTYPE html>
<html>
<head>
<title>Products</title>
</head>
<body>
<ul>
<li>Bannana</li>
<li>Apple</li>
<li>Peach</li>
<li>Eggs</li>
<li>Tomatto</li>
<li>Lettuce</li>
<li>Milk</li>
</ul>
</body>
</html>
  • Select the ul element
  • Remove each list item starting from the last item until the first one
  • (first remove milk, then lettuce and so on..)
  • Use a iterator to accomplish this task