Engrain by ByteRush

MC.08.03 Mid-levelCore — asked often

Shopping cart and checkout

Comes up in: Machine coding

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • product list, add/remove/quantity
  • derived totals (money in integer paise/cents)
  • coupon rules
  • persistence
  • stock limits
  • currency formatting with Intl

Words you will know

derived stateinteger money

What you will practise

  • build (timed 75 min)

Interview questions this answers

  • Why should money be stored as integers?
  • How do you persist a cart for logged-out users and merge it on login?