function numcompare(a,b){

return a-b;

}

nums = new Array(30,10,200,4);

sortednums = nums.sort(numcompare);