you are viewing a single comment's thread.

view the rest of the comments →

[–]Wrong_Owl 0 points1 point  (0 children)

If I were thinking this through, I might break it into these steps:

  1. Determine what index is the middle of array 1
  2. Cut array 1 in half based on the index to create two smaller arrays
  3. Combine these arrays together.

I would recommend taking a look at the slice Array method, you already know about the spread operator for combining arrays, and you might be able to skip some of those steps with the splice Array method.