Skip to content

Commit d0aba6f

Browse files
committed
added complete sound and color to the mergesort
1 parent 03aadd7 commit d0aba6f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

function.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ const SortAlgo = {
221221
}
222222
mergeSort(data, 0, data.length - 1);
223223
swapBar(data);
224+
await timer(time);
225+
svg.selectAll("rect").style("fill", "#56b4d3");
226+
completeAudio.play();
224227
isSorting = false;
225228
isSorted = true;
226229
togglePlay();

0 commit comments

Comments
 (0)