数组排序sort()问题
<script type="text/javascript">
function sortNum(z,b)
{
return a-b;
}
var myarr = new Array("80","16","50","6","100","1");
document.write(myarr.sort(sortNum));
</script>
我不明白的是,为什么a-b是升序,如果a<b,那怎么还是升序
,难道不分a<b或者a>b?