So I want the array that I get back when I input a manufacturer to show the complete data from each object inside the array in the HTML. However when I call the function in the HTML page I only get back the word object however many times the Manufacturer is defined in the original array. Could anyone help please?
// To make program read the data inside the array cars and pick the ones with the desired manufacturer//
function findManufacturer(manufacturer) {
var retcars = [];
for (i = 0; i < cars.length-1; i++) {
car = cars[i]
if (car.manufacturer == manufacturer) {
retcars.push(car)
}
}
display(retcars);
}
function display(mycars) {
document.getElementById('mycars').textContent= mycars;
}