Median Of Two Sorted Arrays Leetcode Javascript