pakoch Posted January 26, 2013 Share Posted January 26, 2013 Hi, I am just starting to learn Javascript and I have a quick question about these statements. total -= discount; total *= tax; Translated to English, does the first one mean: The total minus the discount equals some value? The second one: The total multiplied by the tax equals some value? Thanks, Peter Koch Link to comment Share on other sites More sharing options...
benjamin.morgan Posted January 26, 2013 Share Posted January 26, 2013 Basically it would be written as this. It just takes the discount value and subtracts it from the total and assigns the new value to the total variable. The second one would be the same except with the multiplication operator. total = total - discount; 1 Link to comment Share on other sites More sharing options...
HartleySan Posted January 27, 2013 Share Posted January 27, 2013 Welcome to the forums, Peter Koch. Not sure if you know this, but there is a really famous web developer named Peter-Paul Koch (know as ppk) that started the QuirksMode website. Very interesting coincidence. Link to comment Share on other sites More sharing options...
Recommended Posts