diff --git a/lib/merge-sort.js b/lib/merge-sort.js
index <HASH>..<HASH> 100644
--- a/lib/merge-sort.js
+++ b/lib/merge-sort.js
@@ -40,22 +40,21 @@ function sort(array, compare) {
  * @return The merged array.
  */
 function merge(left, right, compare) {
-  var result = new Array(left.length + right.length);
+  var result = [];
   var leftIndex = 0;
   var rightIndex = 0;
-  var resultIndex = 0;
 
   while (leftIndex < left.length || rightIndex < right.length) {
     if (leftIndex < left.length && rightIndex < right.length) {
       if (compare(left[leftIndex], right[rightIndex]) <= 0) {
-        result[resultIndex++] = left[leftIndex++];
+        result.push(left[leftIndex++]);
       } else {
-        result[resultIndex++] = right[rightIndex++];
+        result.push(right[rightIndex++]);
       }
     } else if (leftIndex < left.length) {
-      result[resultIndex++] = left[leftIndex++];
+      result.push(left[leftIndex++]);
     } else if (rightIndex < right.length) {
-      result[resultIndex++] = right[rightIndex++];
+      result.push(right[rightIndex++]);
     }
   }
   return result;
Use push instead of resultIndex

The time saved expanding the array is not worth it the additional
complexity considering this is primarily for educational purposed.