Some time ago I saw somewhere the thing that Array.slice(0) is faster than Array.slice(). Unfortunately now I can't find that source. So is that possible ? There is any difference between Array.slice(0) and Array.slice() ?
There's no difference, because begin
is assigned to 0
by default if you don't provide any parameter to Array.slice()
method.
begin
Optional
Zero-based index at which to begin extraction. A negative index can be used, indicating an offset from the end of the sequence.
If begin is undefined, slice begins from index 0.
For more info: link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With