I have a array of integers of type string.
var a = [\'200\',\'1\',\'40\',\'0\',\'3\'];
>>> var a = [\'2
Thanks all, though I dont know jQuery much, but from you guys examples, I summarized the code as follows which works as per my requirement
var data = ['10','2', 'apple', 'c' ,'1', '200', 'a'], temp;
temp = data.sort(function(a,b) {
var an = +a;
var bn = +b;
if (!isNaN(an) && !isNaN(bn)) {
return an - bn;
}
return ab ? 1 : 0;
}) ;
alert(temp);