This tutorial serves as an introduction to the power and limitations
of JavaScript's built in Math object, a case study, convert to currency
function. Remember, that part of being a good programmer is testing
different scenarios and checking for desired results. Throughout
this tutorial, you'll be asked to "Try it". Try various
entries when possible and check those results. Doing so will give
you a better understanding when reading through the explanation
of the code.
JavaScript offers a number of built in Math methods (a fancy name
for a function that can be attached to objects) and Math constants,
take the elusive constant "PI" for instance.