Search⌘ K
AI Features

Challenge: MVC Pattern

Explore the MVC architectural pattern by implementing a shopping cart with separate model, view, and controller components. This lesson guides you to manage item display, buying actions, and quantity updates, helping you understand how MVC structures enhance maintainability and interactivity in JavaScript applications.

Problem statement

In this challenge, you have to implement the MVC pattern to display the items in a shopping cart.

You have three components:

  • ShoppingCartModel

    The shopping cart model should have the following properties: itemNumber, itemName, itemQuantity, and itemPrice. It should also have a get ...