function merge(leftArr, rightArr) { let leftInd = 0, rightInd = 0; const sortedArr = []; while(leftInd { if (arr.length