arr1.sort(sortNumber);document.write(arr1);function sortNumber(a,b){ return b-a;}js中的sort(sortNumber)里面參數(shù)是個(gè)函數(shù),為啥不帶括號(hào)()?sort(sortNumber())這樣寫不行嗎?
js中的排序函數(shù)??
qq_天蝎的尾巴卍_0
2017-02-21 12:02:43