I find this really intriguing.
When- var x = [1, 50, 2, 4, 2, 2, 88, 9, 10, 22, 40];
Then x.sort();
will not sort properly
When var x = ["dog","apple","zebra","cow"];
, x.sort();
will sort properly.
what is the proper function to sort them in one call?