const container = document.querySelector('.container'); const coffees = [ { name: 'Tony Stark', image: 'images/Tony_Stark.jpg' }, { name: 'DeusEx', image: 'images/DeusEx.png' }, { name: 'Face', image: 'images/Face.png' }, { name: 'Bear', image: 'images/Bear.png' }, ]; const showCoffees = () => { let output = ''; coffees.forEach( ({ name, image }) => (output += `

${name}

[CLICK]
`), ); container.innerHTML = output; }; document.addEventListener('DOMContentLoaded', showCoffees);