• Sorts the numbers of an array in ascending order and returns a new array.

    Parameters

    • array: number[]

      The array to sort

    Returns number[]

    A new array with the numbers sorted in ascending order

    Example

    <pre>
    const original = [20, 10];
    const result = [10, 20];
    expect(sortNumbersAscending(original)).to.eql(result);
    </pre>

Generated using TypeDoc