I get the data from an API with an array that parses it with pure js.
This array returns me more than one object I'm currently viewing only in the browser's console.log. I do not know how to make a for in pure js. How do I make a for and then display the data of this array on the page with the objects separated. When I get one I do the following:
if(xhr.status == 200){
let curso = xhr.responseText;
curso = JSON.parse(curso);
let video = '';
video += curso.video;
document.querySelector('#video').innerHTML = video;
let descricao ='';
descricao += curso.descricao;
document.querySelector('#curso-descricao').innerHTML = descricao;
}
In this way it displays the video data and description, but it is only with one object. How do I do this same action to list objects in my frontend using pure js?