JSFiddle - React, Tailwind, and code Playground

JavaScript

'This is vba code...
   
   Public Function QSortInPlace( _
        ByRef InputArray As Variant, _
        Optional ByVal LB As Long = -1&, _
        Optional ByVal UB As Long = -1&, _
        Optional ByVal Descending As Boolean = False, _
        Optional ByVal CompareMode As VbCompareMethod = vbTextCompare, _
        Optional ByVal NoAlerts As Boolean = False) As Boolean
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' QSortInPlace
    '
    ' This function sorts the array InputArray in place -- this is, the original array in the
    ' calling procedure is sorted. It will work with either string data or numeric data.
    ' It need not sort the entire array. You can sort only part of the array by setting the LB and
    ' UB parameters to the first (LB) and last (UB) element indexes that you want to sort.
    ' LB and UB are optional parameters. If omitted LB is set to the LBound of InputArray, and if
    ' omitted UB is set to the UBound of the InputArray. If you want to sort the entire array,
    ' omit the LB and UB parameters, or set both to -1, or set LB = LBound(InputArray) and set
    ' UB to UBound(InputArray).
    '
    ' By default, the sort method is case INSENSTIVE (case doens't matter: "A", "b", "C", "d").
    ' To make it case SENSITIVE (case matters: "A" "C" "b" "d"), set the CompareMode argument
    ' to vbBinaryCompare (=0). If Compare mode is omitted or is any value other than vbBinaryCompare,
    ' it is assumed to be vbTextCompare and the sorting is done case INSENSITIVE.
    '
    ' The function returns TRUE if the array was successfully sorted or FALSE if an error
    ' occurred. If an error occurs (e.g., LB > UB), a message box indicating the error is
    ' displayed. To suppress message boxes, set the NoAlerts parameter to TRUE.
    '
    ''''''''''''''''''''''''''''''''''''''
    ' MODIFYING THIS CODE:
    ''''''''''''''''''''''''''''''''''''''
    ' If you modify this code and you...