how do I loop through array of objects that has space between
const carPrices = [{
"Honda Civic" : 5000,
"Toyota": 3000,
"Audi Q3": 6000
}]
the total of the prices is: 14000
Object.entries(carPrices).forEach(
([key, value]) =>{ console.log( 'the total of the prices is:' value.Honda Civic ) }
);
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment