Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Consider the following code snippet

    data.sort(function(a,b),b-a);

    What does the above code do?

  2. A.

     Sort in the alphabetical order

    B.

     Sort in the chronological order

    C.

     Sort in reverse alphabetical order

    D.

     Sort in reverse numerical order

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    The above code snippet sorts an array in reverse numerical order.


Be The First To Comment