var findMedianSortedArrays = function(nums1, nums2) {
let arr = [...nums1, ...nums2];
arr.sort((a,b)=>a-b)
let mid = Math.ceil(arr.length / 2);
let yu = arr.length % 2;
if (yu) {
return arr[mid - 1]
} else {
return (arr[mid - 1] + arr[mid]) / 2
}
};