But my mom always taught me to look before I slice. So I started wondering — Why do I call the ‘slice’ method, even though I’m not cutting anything shorter?
Next, I looked into the syntax. Why would I put ‘arguments’ into the first slot instead of a start index?
What about indices? Shouldn’t I have to put indices for the slice, eg. Array.prototype.slice.call(arguments, 0, arguments.length)?
From the ECMAScript source: If no starting index is entered, slice is instructed to start at index 0. If no ending index is entered, slice is instructed use this.length as the default. So you’re basically taking a snippet — in this case, the entire arguments set — and calling new Array() on it.