Copies part of array within.
[:package:](https://www.npmjs.com/package/@extra-array/copy-within)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/copy-within)
[:vhs:](https://asciinema.org/a/332032)
[:moon:](https://www.npmjs.com/package/@extra-array/copy-within.min)
[:scroll:](https://unpkg.com/@extra-array/copy-within/)
[:newspaper:](https://nodef.github.io/extra-array/)
[:blue_book:](https://github.com/nodef/extra-array/wiki/)

> Alternatives: [copyWithin], [copyWithin$].<br>
> Similar: [copy], [copyWithin], [moveWithin].

> This is part of package [extra-array].

[extra-array]: https://www.npmjs.com/package/extra-array

<br>

```javascript
array.copyWithin(x, [j], [i], [I]);
// x: an array
// j: write index (0)
// i: read start index (0)
// I: read end index (X)
```

```javascript
const array = require("extra-array");

var x = [1, 2, 3, 4, 5];
array.copyWithin(x, 3);
// [ 1, 2, 3, 1, 2 ]

array.copyWithin(x, 3, 1);
// [ 1, 2, 3, 2, 3 ]

array.copyWithin(x, 3, 1, 2);
// [ 1, 2, 3, 2, 5 ]
```

<br>
<br>


## References

- [Array.prototype.copyWithin: MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin)
- [immutable-iterable-prototype: @azu](https://github.com/azu/immutable-iterable-prototype)

[copyWithin]: https://github.com/nodef/extra-array/wiki/copyWithin
[copyWithin$]: https://github.com/nodef/extra-array/wiki/copyWithin$
[copy]: https://github.com/nodef/extra-array/wiki/copy
[moveWithin]: https://github.com/nodef/extra-array/wiki/moveWithin
