Copy the first two array elements to the last two array elements

The solution for “Copy the first two array elements to the last two array elements” can be found here. The following code will assist you in solving the problem.

var fruits = [“Banana”, “Orange”, “Apple”, “Mango”];
fruits.copyWithin(2, 0);

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in