fileAndWordListValuesOnly = fileAndWordListValuesOnly.sort(compare_nbMots);\r
\r
var listToOutput = new Array();\r
- for (var j in fileAndWordListValuesOnly) {\r
+ for (var fawlvoIdx in fileAndWordListValuesOnly) {\r
for (t in temptab) {\r
- if (temptab[t].motsliste == fileAndWordListValuesOnly[j]) {\r
- if (listToOutput[j] == undefined) {\r
- listToOutput[j] = new Array(temptab[t]);\r
+ if (temptab[t].motsliste == fileAndWordListValuesOnly[fawlvoIdx]) {\r
+ if (listToOutput[fawlvoIdx] == undefined) {\r
+ listToOutput[fawlvoIdx] = new Array(temptab[t]);\r
} else {\r
- listToOutput[j].push(temptab[t]);\r
+ listToOutput[fawlvoIdx].push(temptab[t]);\r
}\r
}\r
}\r
} \r
// Sort results by scoring, descending on the same group\r
- for (var i in listToOutput) {\r
- listToOutput[i].sort(function(a, b){\r
+ for (var ltoIdx in listToOutput) {\r
+ listToOutput[ltoIdx].sort(function(a, b){\r
return b.scoring - a.scoring;\r
});\r
}\r