The returned array should be the length of the passed array, less two. The assertion assert(arr.every((v, i) => v === i + 3)); returns true because it is an empty array, thus passing an incorrect response.
Desktop (please complete the following information):
Describe the bug
In the assignment ES6: Use Destructuring Assignment with the Rest Operator to Reassign Array Elements, if an empty array is returned, the assignment is passed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The returned array should be the length of the passed array, less two. The assertion
assert(arr.every((v, i) => v === i + 3));
returns true because it is an empty array, thus passing an incorrect response.Desktop (please complete the following information):