Hi, here is a challenge in java script algorithm section.
Here is the solution
function frankenSplice(arr1, arr2, n) {
// It's alive. It's alive!
let arr = arr2.slice(0);
arr.splice(n, 0, [...arr1]);
return arr;
}
frankenSplice([1, 2, 3], [4, 5, 6], 1);
Out of 6 only two test cases passed. But when I tested it gave correct answer. Don’t know what is wrong here. Anyone help me out.