If the second parameter is specified as zero, the user would expect _no_ elements to be removed (just like if you were to `splice` with zero as the second argument, no elements are removed), but instead it defaults the end to the length of the array. This should look more like:

```js
var end = typeof endIndex === "number" ? endIndex : this.children.length;
```