Build a Music Instrument Filter - Step 13

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

Try to break down the instructions into steps

Remove your console.log from the event listener and set the inner HTML of productsContainer to the result of calling instrumentCards with the selected category option.

  1. Remove your console.log from the event listener :white_check_mark:
  2. set the inner HTML of productsContainer to :white_check_mark:
  3. the result of calling `instrumentCards :white_check_mark:
  4. with the selected category option. :white_check_mark:

You did everything asked for in the instructions.

And then you added something else that’s not asked for in the instructions. Why?

i don’t really know why this is so add for me to get and concerning your question i think i followed every instruction been giving to me,i will be happy if you can go deeper and give me simple method to deal with this, thanks

Process of elimination: Look at each instruction bit that @pkdvalis listed. What is in your code above that is not listed there?

Try it again, follow the instructions just as you did before. You can use this breakdown if it’s more clear:

You did it correctly before.

i got it thank you so much

1 Like