I created a simple code where the parent element, which is the `<ul>`, removes a single child, which is `<li>`, every time it is clicked. The execution was successful, but every time I click the parent element, there is a message in the console that says there is something wrong with my code. You will see it when you copy and paste this code:

HTML

```
<ul>
    <li>one</li>
    <li>two</li>
    <li>three</li>
    <li>four</li>
    <li>five</li>
</ul>

```

JavaScript

```
query('ul').onclick = function() {
    var childItems = Array.prototype.slice.call(this.children);
    for(var c=0; c<childItems.length; ++c) {
        while(childItems.length != 0) {
            this.removeChild(childItems[c]);
        }
    }
}

```

Can someone tell me what's wrong with my code and how to fix it?