JavaScript二维数组排序的问题

有一个数组
var a = new Array();

还有多个数组

var b= new Array();
b[0]="sss"
b[1]="sss"
b[2]="test2"
b[3]="test3"
b[4]="test4"
b[5]="test5"
b[6]="test6"

数组a.concat(b[0]),a.concat(b[3]),a.concat(b[1]),a.concat(b[0]),a.concat(b[2]),

数组a,内部的顺序按照 b的下标来排序,

需求很BT,猜不出LZ要干嘛
[code="javascript"]
if(!b.indexOf)b.indexOf = function(x){ //ie array 无有indexOf
for(var i=0,l=b.length; i if(b[i] == x)return i;
}
return -1;
}
a.sort(function(x, y){
return b.indexOf(x) > b.indexOf(y);
})
[/code]

[quote]数组a,内部的顺序按照 b的下标来排序, [/quote]

没看懂需求