Easy there, pal!
To access the Introduction to JavaScript in the browser challenges in the Deep dive in JavaScript for browsers, you need to sign up and subscribe first.
Muffin liked how you coped with the puncher store task and entrusted you with one more combat mission.
Meow! We must display the current state of the products on the store website: “in stock”, “not available”, “bestseller”.
Product data is stored in an array with
assortmentDataobjects, each object corresponds to one product and contains the following properties:
inStock: if the value istrue, ice cream is available, if it isfalse, the products is out of stock.isHit: if the value istrue, the ice cream is the most popular among customers.Each product state corresponds to a special class:
- Product in stock:
good--available.- Unavailable product:
good--unavailable.- Bestseller:
good--hit.Design the code as the
updateCardsfunction, which accepts data arrays. Call it by transferringassortmentData.
Press Hey boss, here’s your program! to call the Boss. He will check if your program is working correctly. Good luck!
You’ve gone to a different page
Click inside the mini-browser to shift the focus onto this window.
To access the Introduction to JavaScript in the browser challenges in the Deep dive in JavaScript for browsers, you need to sign up and subscribe first.
Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.
Forgot to connect your email to the profile? Email us and we’ll help.