k=0
for(var i=0i<5i++){
a[i]=new Array()
for(var j=0j<5j++){
k+=1
a[i][j]=k
if(i>=j){
document.write(a[i][j]+"")
}
}
document.write("<br/>")
}
var data = [[13,'a'],
[23,'b'],
[18,'c'],
[7,'d'],
[50,'e'],
[22,'f'],
[19,'g']
]
var tt = data.sort(function(a,b){ return a[0] -b[0]})
console.log(tt)
var str = "23,52\r\n23,53\r\n23,55\r\n25,32\r\n25,34\r\n25,32\r\n27,33\r\n27,54"var result = {}
var reg = /([^,\r\n]+),([^,\r\n]+)/g
while(reg.exec(str)){
if(!result[RegExp.$1]){
result[RegExp.$1] = [RegExp.$2]
}else{
result[RegExp.$1].push(RegExp.$2)
}
}
console.log(result)