Jump to content


Photo

Code Error Page 58


  • Please log in to reply
No replies to this topic

#1 SigmaFour

SigmaFour

    New Member

  • Members
  • Pip
  • 1 posts

Posted 11 March 2013 - 07:44 PM

var discount = Math.floor(Math.random() *5) + 5);

This never yields a discount of 10%, range is 5% - 9%

var discount = Math.floor(Math.random() *6) + 5);

Yields the correct result.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users