Firstly: why are you using a JavaScript-coded sort function? It
will be 100s of times slower than the sort function provided by to the JavaScript interpreter via Array.sort().
It's sorting alphabetically in ASCII, not by integer value (I would have thought the function name, 'sortAsc', would have been a clue here). The JavaScript Array.sort function also does the same, but you can pass it a function as a parameter that will be used in evaluating how to sort the list.
So, to sort a bunch of numbers:
var nums = new Array(32, 23, 5, 49, 82, 245, 5, 1);
nums.sort(function(a, b) { return a - b; });
// nums is now sorted.