Basic Algorithm Scripting - Slice and Splice

Tell us what’s happening:
With this code the function is very good using for iterator

Your code so far

function frankenSplice(arr1, arr2, n) {
  let out = [];

  for(let i = 0; i < n ; i++){
    out.push(arr2[i]);
  }

  out.push(...arr1);

  for(let i = n; i < arr2.length ; i++){
    out.push(arr2[i]);
  }

  console.log(out)
  return out;
}

frankenSplice([1, 2, 3], [4, 5, 6, 10, 50, 20, 35, 15], 2);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Challenge: Basic Algorithm Scripting - Slice and Splice

Link to the challenge:

I don’t understand your question unfortunately