Skip to content
Snippets Groups Projects
Commit 71b9dd6c authored by Aymane Ismail's avatar Aymane Ismail
Browse files

Moitie G

parent 613c30c3
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@
<link rel="stylesheet" href="css/pizzaList.css">
<link rel="stylesheet" href="css/footer.css">
<script src="build/main.js" defer></script>
<script src="src/main.js" defer></script>
</head>
<body>
......
......@@ -30,7 +30,7 @@ data.forEach(element => {
);
*/
const data = [
let data = [
{
name: 'Regina',
base: 'tomate',
......@@ -54,6 +54,22 @@ const data = [
}
];
// trie par nom
data.sort((a, b) => a.name.localeCompare(b.name))
console.log(data);
data.sort((a, b) => a.price_small - b.price_small)
console.log(data);
//data = data.filter(word => word.base == 'tomate' );
//data = data.filter(word => word.price_small < 6 );
data = data.filter(word => word.name == 2);
let html="";
data.forEach(element => {
......@@ -73,8 +89,6 @@ data.forEach(element => {
</a>
</article>`;
console.log(html);
html += html2;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment