-
Notifications
You must be signed in to change notification settings - Fork 191
Expand file tree
/
Copy pathBuildString.js
More file actions
15 lines (14 loc) · 495 Bytes
/
BuildString.js
File metadata and controls
15 lines (14 loc) · 495 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function gerarLista(lista) {
var array = new Array(lista.length);
for (var i = 0; i < lista.length; i++) {
array[i] = `<div class="item">
<div class="descricao">${lista[item].descricao}</div>
<div class="imagem">
<img src="${lista[item].imagem}" />
</div>';
<div class="valor">${lista[item].valor}</div>
</div>`;
}
$("#produtos").html(array.join(""));
}
//https://pt.stackoverflow.com/q/389201/101