See this line:
```var end = endIndex || this.children.length;```

If `endIndex` is 0 (falsy), the `end` variable will be evaluated to `this.children.length`. Then the method would remove all elements, which is opposite to the expected result. ;) 


> but this is just making the too many checks, to avoid users who don't know what they are doing :p

These checks are pretty good to include since they notify the programmer that _they_ are providing problematic input, making it easy for them to catch bugs early on. :)