Q. Consider the following code snippet
data.sort(function(a,b),b-a);
What does the above code do?
β
Correct Answer: (D)
Sort in reverse numerical order
Explanation: The above code snippet sorts an array in reverse numerical order.