I am collecting the values selected by the user and playing them in an array. After that, I created a loop to throw those values into a string to print on the screen. The problem is they are all coming in a row just with a space between them. Here is the code for the loop:
var descr = "";
for (var i = 0; i < nomes.length; i++) {
descr = descr + "\n" + nomes[i] + ": " + qtd[i];
}
descr = descr + "\n";
$("#itens").text(descr);