Tell us what’s happening:
please help me look at this no 13 i don’t really know the problem
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const selectContainer = document.querySelector("select");
const productsContainer = document.querySelector(".products-container");
function instrumentCards(instrumentCategory) {
const instruments =
instrumentCategory === "all"
? instrumentsArr
: instrumentsArr.filter(
({ category }) => category === instrumentCategory
);
return instruments.map(({ instrument, price }) => {
return `
<div class="card">
<h2>${instrument}</h2>
<p>$${price}</p>
</div>
`;
});
}
selectContainer.addEventListener("change", () => {
productsContainer.innerHTML = instrumentCards(selectContainer.value).join("");
});
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Music Instrument Filter - Step 13