JavaScript Professional — Medium
Key points
- copyWithin() moves elements within the same array
- fill() replaces elements with a static value in a range
- Both methods mutate the original array
- copyWithin() does not change the array length
- fill() sets elements to a specific value
Ready to go further?
Related questions
