What is difference between sorting string array and sorting numerical array in jquery?
Answer / 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 |
What are the difference between alert() and confirm()?
What are jquery selectors?
What is each() function in jQuery? How do you use it?
What is the starting point of code execution in jquery?
List the basic selectors in jquery?
What is difference between prop and attr?
Explain the use of jquery .each() function? : jquery mobile
Consider a scenario where things can be done easily with javascript, would you still prefer jQuery?
Define cdn in jquery?
Can you please explain the difference between event.preventdefault and "return false"? : jquery mobile
How to check variable is empty or not in jquery?
What is method chaining in jquery?