Examveda
Examveda

Consider the following code snippet
data.sort(function(a,b),b-a);
What does the above code do?

A. Sort in the alphabetical order

B. Sort in the chronological order

C. Sort in reverse alphabetical order

D. Sort in reverse numerical order

Answer: Option D

Solution(By Examveda Team)

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

This Question Belongs to Javascript >> Classes And Modules

Join The Discussion

Related Questions on Classes and Modules