You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give an array with a variable amount of indexes and nested arrays inside it (of any sort of data), write a custom copy function capable of deep-copying an array.
*/
function copy(arr) {
const final = [];
for (let i = 0; i < arr.length; i++) {
if (arr[i].length && typeof arr[i] === "object") {