You might want to use `end = undefined` here so that end gets `len` and not `this.length`