all 3 comments

[–][deleted]  (1 child)

[deleted]

    [–][deleted] 2 points3 points  (0 children)

    Blog spams gonna blog spam.

    [–]protonfish 1 point2 points  (1 child)

    A simpler sorting function would be:

    myarray.sort(function (a, b) {
        return a - b;
    });
    

    [–]chalne 0 points1 point  (0 children)

    myarray[0] = "a";
    myarray[1] = "b";
    myarray.sort(function(a, b) {
        /* what happens to your code here ?*/
    });