function sort(array = []) {
  const size = array.length;
  // base case
  if (size < 2) {
    return array;
  }
  if (size === 2) {
    return array[0] > array[1] ? [array[1], array[0]] : array;
  }
  // slit and merge
  const mid = parseInt(size / 2, 10);
  return merge(sort(array.slice(0, mid)), sort(array.slice(mid)));
}
Sort array in asc order using merge-sort
@example
   sort([3, 2, 1]) => [1, 2, 3]
   sort([3]) => [3]
   sort([3, 2]) => [2, 3]
@param {array} array