Closed rwaldron closed 10 years ago
Actual:
console.log( [1, 2, 3].fill(4, -3, -2) ); // [1, 2, 3]
Expect:
console.log( [1, 2, 3].fill(4, -3, -2) ); // [4, 2, 3] // length = 3 // 3 + -3 = 0 <-- calculated start // 3 + -2 = 1 <-- calculated end
From spec:
If start is negative, it is treated as length+start where length is the length of the array. If end is negative, it is treated as length+end.
Thanks, will fix
That was quick! Thanks :)
I've got 0.14.0 queued to release but I want to wait on #268
Actual:
Expect:
From spec: