Foundations

Track a Balance

Track a Balance

MediumFoundationsPRO

Practice JavaScript variables and arithmetic by tracking a balance that changes through several updates. This medium exercise asks you to preserve the starting value, update mutable state, and calculate the net change without mixing original and final values.

What you'll practice

  • Work with JavaScript variables and arithmetic by tracking a balance that changes through several updates
  • Preserve the starting value
  • Update mutable state
  • Calculate the net change without mixing original and final values

Unlock full access

Choose a plan and go straight to secure checkout.

  • All 600+ interactive exercises
  • Full course curriculum
  • Access to guided projects
  • All future content included

Secure checkout with Stripe. Cancel anytime.