mergeSortedArrays
Merges two sorted arrays into one.
- Use the spread operator (
...
) to clone both of the given arrays. - Use
Array.from()
to create an array of the appropriate length based on the given arrays. - Use
Array.prototype.shift()
to populate the newly created array from the removed elements of the cloned arrays.