我有一個數組。如下所示:var num = [2,1,2,6,2,4];我想排序但返回index一個數組:var result = [1, 0, 2, 4, 5, 3];如果有相同的數字,index應該先放置較小的。
排序數字數組并返回索引js
呼喚遠方
2022-07-08 16:11:26