This is a submission for Frontend Challenge: Office Edition sponsored by Axero, Holistic Webdev: Office Space.
📚 Table of Contents
...
For further actions, you may consider blocking this person and/or reporting abuse
This is amazing!!!
Well done 👏
Thank you
Great work!! 💻
Thanks
hi sir
that's awesome!
Thank you
well designed!
Thank you
Hey go girl!
Thanks
🤟
Thanks
design layout is good and transition is also beautifully engaged 👏
Thanks
Great!Well done!!👍
Thanks
Great!!
Thank you
nice try , see you forward 🤘
Thank you
👍👍
Thanks
🔥🔥
Thanks
💻🔥🔥
Thanks
Great responsiveness!!
Thanks
Awesome 👌
Thanks
Wow!
Thanks
Effective office website
Thanks
so elegant
Thanks
👌
Thanks
const instrumentsArr = [
{ category: "woodwinds", instrument: "Flute", price: 500 },
{ category: "woodwinds", instrument: "Clarinet", price: 200 },
{ category: "woodwinds", instrument: "Oboe", price: 4000 },
{ category: "brass", instrument: "Trumpet", price: 200 },
{ category: "brass", instrument: "Trombone", price: 300 },
{ category: "brass", instrument: "French Horn", price: 4300 },
{ category: "percussion", instrument: "Drum Set", price: 500 },
{ category: "percussion", instrument: "Xylophone", price: 3000 },
{ category: "percussion", instrument: "Cymbals", price: 200 },
{ category: "percussion", instrument: "Marimba", price: 3000 }
]
const selectContainer = document.querySelector(".select-container");
const productsContainer = document.querySelector(".products-container");
function instrumentCards(instrumentCategory) {
const filtered =
instrumentCategory === "all"
? instrumentsArr
: instrumentsArr.filter(instrument => instrument.category === instrumentCategory);
let html = "";
for (let i = 0; i < filtered.length; i++) {
html +=
;<div class="card">
<h2>${filtered[i].instrument}</h2>
<p>$${filtered[i].price}</p>
</div>
}
return html;
}
selectContainer.addEventListener("change", function () {
const selectedValue = this.value;
productsContainer.innerHTML = instrumentCards(selectedValue);
});
productsContainer.innerHTML = instrumentCards("all"); When the dropdown menu option is changed you should set the inner HTML of productsContainer to the result of the instrumentCards function called with the selected option as argument. code won't pass. this code won't pass, please i do need solution to this