# Slice and Splice errors? Help please!

**URL:** <https://forum.freecodecamp.org/t/slice-and-splice-errors-help-please/35497>\
**Category:** General\
**Created:** [September 9, 2016, 7:59pm UTC](https://forum.freecodecamp.org/t/slice-and-splice-errors-help-please/35497 "2016-09-09T19:59:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolaScriptura92](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/solascriptura92/32/120561_2.png) [@SolaScriptura92](https://forum.freecodecamp.org/u/SolaScriptura92)\
**Post date:** [September 9, 2016, 7:59pm UTC](https://forum.freecodecamp.org/t/slice-and-splice-errors-help-please/35497/1 "2016-09-09T19:59:39Z")

</div>

My code is the following:

function frankenSplice(arr1, arr2, n) {  
// It’s alive. It’s alive!

var arr1Copy = arr1.slice();  
var arr2Copy = arr2.slice();

for (var i = 0; i \< arr1.length; i++) {

```
arr2Copy.splice(n, 0, arr1Copy[i]);
n++;
}

```

return arr2Copy;

}

frankenSplice([1, 2], [“a”, “b”], 1);

And I keep getting the following errors:

frankenSplice([1, 2], [“a”, “b”], 1) should return [“a”, 1, 2, “b”].  
The first array should remain the same after the function runs.  
The second array should remain the same after the function runs.

Can someone please explain to my why? I’m so lost…

---

<div class="post-metadata">

**Author:** ![SolaScriptura92](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/solascriptura92/32/120561_2.png) [@SolaScriptura92](https://forum.freecodecamp.org/u/SolaScriptura92)\
**Post date:** [September 9, 2016, 8:08pm UTC](https://forum.freecodecamp.org/t/slice-and-splice-errors-help-please/35497/3 "2016-09-09T20:08:16Z")

</div>

Ahh that would explain it. Thank you so much! It’s a new challenge they just added right? I don’t recall seeing it in the list of challenges a few days ago.

---

<div class="post-metadata">

**Author:** ![QuincyLarson](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/quincylarson/32/212400_2.png) [@QuincyLarson](https://forum.freecodecamp.org/u/QuincyLarson)\
**Post date:** [September 9, 2016, 8:55pm UTC](https://forum.freecodecamp.org/t/slice-and-splice-errors-help-please/35497/5 "2016-09-09T20:55:27Z")

</div>

Like @p1xt said, this challenge was not supposed to be released, and is still under development. We will remove it next time we deploy (hopefully in the next hour or so). You can skip it. Thanks for your patience.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [January 16, 2021, 5:29am UTC](https://forum.freecodecamp.org/t/slice-and-splice-errors-help-please/35497/6 "2021-01-16T05:29:33Z")

</div>

Closed on January 16, 2021, 5:29am UTC


