operator precedence

more details

  1. weired behavior of math in javascriptcacul

截屏2024-12-11 14.50.07.png

calculations with floats are somtimes inaccurate.

When working with money,

  1. do the calculation in cents
  2. convert back to dollars

how to round a number

截屏2024-12-11 14.56.54.png