adspace
What is difference between sorting string array and sorting numerical array in jquery?
Answer Posted / Sumant Kumar
In jQuery, when sorting a numeric array, the numbers are sorted as intended because jQuery automatically recognizes them as numeric values. However, when sorting a string array, you need to ensure that the strings are in a format that can be sorted numerically if necessary (e.g., by wrapping the array in the jQuery.makeArray function and using parseFloat or parseInt to convert the elements).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to always reference latest version of jquery?
Do you have plans for a new jquery plug-in or something else we should look out for? Where to from here for the imgpreview plugin?
How can jquery library be added to pages?
What is the minimum setup needed to start using jquery.
How do you install/use jquery in a project. What is the minimum setup needed to start using jquery.
How to validate email using jquery?