Skip to content
Snippets Groups Projects
Commit 937418ca authored by Nathanael Malderez's avatar Nathanael Malderez
Browse files

Affichage des trois pizzas

Problème d'affichage
parent 70debc45
No related branches found
No related tags found
No related merge requests found
const name = 'Regina';
const url = `images/${name.toLowerCase()}.jpg`;
console.log(url);
let html = `
let html = ``;
const data = ['Regina', 'Napolitaine', 'Spicy'];
data.forEach(function(d) {
const url = `images/${d.toLowerCase()}.jpg`;
html = html + `
<article class="pizzaThumbnail">
<a href="${url}">
<img src="${url}"/>
<section>${name}</section>
<section>${d}</section>
</a>
</article>`;
console.log(html);
const data = ['Regina', 'Napolitaine', 'Spicy'];
data.forEach(element
);
});
console.log(html)
document.querySelector('.pageContent').innerHTML = html;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment