Print manually and then tried to use for
to print, but it turned out I could not see it properly.
let mochila = new Array();
let item1 = ['corda', 2],
item2 = ['faca', 3],
item3 = ['cura', 23],
item4 = ['prego', 35];
mochila.push(item1);
mochila.push(item2);
mochila.push(item3);
mochila.push(item4);
document.write(mochila[0][0] + ' - ' + mochila[0][1] + '<br/>');
document.write(mochila[1][0] + ' - ' + mochila[1][1] + '<br/>');
document.write(mochila[2][0] + ' - ' + mochila[2][1] + '<br/>');
document.write(mochila[3][0] + ' - ' + mochila[3][1] + '<br/>');
document.write('----------------------------------------<br/>');
for(let i = 0; i < item1.length; i++){
for(let j = 0; j < item1.length; j++){
document.write(mochila[i][j] + ' - ' + mochila[i][j] + '<br/>');
}
}