Allora secondo voi perchè con questa funzione riesco ad ordinare correttamente le stringhe e non i numeri? 
Codice:
function sortAsc (array)
{
for (i = 0; i < array.length - 1; i++)
for (j = i + 1; j < array.length; j++)
if (typeof (array[i]) == "string" && typeof (array[j]) == "string")
if (array[i].toLowerCase() > array[j].toLowerCase())
{
x = array[i];
array[i] = array[j];
array[j] = x;
}
else if (typeof (array[i]) == "number" && typeof (array[j]) == "number")
if (array[i] > array[j])
{
x = array[i];
array[i] = array[j];
array[j] = x;
}
return array;
}