Add function documentation to combSort function

This commit is contained in:
Charlie Moore
2021-10-04 18:42:28 -04:00
parent 199d2637cc
commit 4ebe59345b

View File

@ -16,7 +16,13 @@
* Wikipedia: https://en.wikipedia.org/wiki/Comb_sort
*/
function combSort (list) {
/**
* combSort returns an array of numbers sorted in increasing order.
*
* @param {number[]} list The array of numbers to sort.
* @return {number[]} The array of numbers sorted in increasing order.
*/
function combSort(list) {
if (list.length === 0) {
return list
}