var toFormat = [[1, "one", "unu"], [2, "two", "du"], [3, "three", "tri"], [4, "four", "kvar"]];
I need to output array toFormat so it should look like this:
1 (one)
2 (two)
3 (three)
4 (four)
(The third element of every sub-array is not used) How to do that?
EDIT: The loop is here
var res = [];
for(var i=0;i<toFormat.length;i++){
res.push(toFormat[i][1]+" ("+toFormat[i][2]+")");
}
console.log(res.join("\n"))