Implement a function that merges two sorted arrays into another sorted array. Name it mergeArrays(arr1, arr2)
Input: An array and a number value
Output: An array with two integers a and b ([a,b]) that add up to value
Input
arr1 = [1,3,4,5]
arr2 = [2,6,7,8]
Output
arr = [1,2,3,4,5,6,7,8]function mergeArrays(array1: number[], array2: number[]): number[] {
return [];
}
// Test Cases
console.log(mergeArrays([1, 3, 4, 5], [2, 6, 7, 8])); // [1, 2, 3, 4, 5, 6, 7, 8]
console.log(mergeArrays([], [])); // []
console.log(mergeArrays([], [1, 2, 3, 4, 5])); // [1,2,3,4,5]
console.log(mergeArrays([1, 4, 45, 63], [])); // [1,4,45,63]
console.log(mergeArrays([4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4])); // [4,4,4,4,4,4,4,4,4,4,4,4,4,4]
console.log(mergeArrays([-133, -100, 0, 4], [-2000, 2000])); // [-2000,-133,-100,0,4,2000]





