The core functionality used for a storefront application, made with Javascript.
I will be doing all of the work in script.js
, which is inside the starter/src/assets
folder. The starter code file structure looks like this:
Starter Code
├── src
│ ├── assets
│ │ ├── front.js
│ │ ├── script.js <--- Where I will be doing your work
│ │ └── styles.css
│ ├── images
│ │ ├── cherry.jpg
│ │ ├── orange.jpg
│ │ └── strawberry.jpg
│ └── index.html
├── tests
│ └── script.test.js
├── package.json
└── package-lock.json
Step 1: Review the starter code
Step 2: Build the products
Step 3: Create the cart functionality.
addProductToCart()
increaseQuantity()
decreaseQuantity()
removeProductFromCart()
Step 4: Create the Checkout Functionality.
cartTotal()
pay()
Step 5: REFACTOR!
Step 6: Re-test the user interface
Step 7: [Optional] Add extra features
- Remove all items from the cart using an
emptyCart
function. - Integrate a currency switcher to switch between USD, EUR, and YEN.
- Implement currency formatting to accomodate USD, EUR, and YEN.
- Node.js (https://nodejs.com) - A JavaScript runtime for creating JavaScript servers
- Live Server (https://www.npmjs.com/package/live-server) - Live reloading for your workspace
- Jest (https://jestjs.io/) - A JavaScript testing framework