There are quite a few array methods. Whatβs important to understand is that they can mutate the current array or create a shallow copy of it. A shallow copy is peculiar because all primitives will be duplicated, but objects will have just their references copied.
| [π, π, π, π].fill(πββ¬) | → | [πββ¬, πββ¬, πββ¬, πββ¬] |
| [π, π, π, π].copyWithin(0, 2, 3) | → | [π, π, π, π] |