[thelist] mod (%) help
erik mattheis
gozz at gozz.com
Thu Jul 17 02:40:37 CDT 2008
On Thu, Jul 17, 2008 at 2:04 AM, Brian Cummiskey <brian at hondaswap.com>
wrote:
>
> i somehow need to track each mod loop iteration, and then add that as
> '4' to the returned mod figure. so, 4 + 2 returned from the modulus = 6
> at regular price.
in js:
var discountedWheels = 0;
var discountedKits = 0;
for (var totalWheels = 0; totalWheels >= 4; totalWheels -= 4) {
discountedWheels +=4;
discountedKits += 1;
}
fullPriceWheels = totalWheels;
alert(fullPriceWheels);
alert(discountedWheels);
alert(discountedKits);
--
Erik
http://fearofclowns.com/
612 377 21272
More information about the thelist
mailing list