-4
I’m having a problem with javascript. I have an array with 500 positions, I want to print all the data in my html. But when I throw this dice into a div it pulls only the last element. I appreciate your help. Follows code.
<button getList> campos</button>
<textarea id="conteudo"></textarea>
app.getList("FieldList", function(reply){
var Campos = reply.qFieldList.qItems;
var texto = document.getElementById('conteudo')
Campos.forEach((element,index) => {
texto.innerHTML = element.qName + index
console.log(element.qName,index)
})
Puts a + after the innerHTML so:
+=
– LeAndrade