After doing the requests track in javascript, I decided to practice what I learned. I am using a xhr GET and want to display the data to the html. I console.log(xhr.response) and on the console it shows an object array called employee with 10 people. In each index, there is a name, age, job.
console.log(xhr.response);
//prints this
Object:
employee: Array(10)
0: {name: ‘John’, age: ‘27’, job: ‘IT’}
1: {name: ‘Bob’, age: ‘35’, job: ‘Teacher’}
…
What I want to do is add for example the first index to the html with the name and job in one line and the age in a new line. How do I do this?