scrimba
Merge Sort
Imperative
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Imperative
Expand for more info
merge-sort.js
run
preview
console
let defaultCompare = (a, b) =>
a > b ? 1 : (a < b ? -1 : 0);

let mergesort = (
array,
start = 0,
end = array.length,
compare = defaultCompare
) => {
return array.slice(start, end);
};

export default mergesort;
Console
/index.html
-8:46