Why so much Randomness 🤔 ! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why so much Randomness 🤔 !

Hi, Have a look at his , https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/get-started/apB.md#practicing-prototypes Can you see the reel.spin() - that's to spin the reel, alright! The if the statement is for spinning the reel( choosing other this.position randomly) for the first time But but, what's the point of assigning this.position to ( this.position + 100 + randMax(100)) % this.symbols.length; Does it add more randomness to the spinning or is it something else ?

11th Sep 2020, 12:51 PM
Monkey D. Luffy
Monkey D. Luffy - avatar
1 Answer
+ 2
Doesn't makes sense ,outcome is still random(about more randomness ,can't say that) like with the first method ,the other method only do one thing ,includes the position 7 as well
11th Sep 2020, 1:33 PM
Abhay
Abhay - avatar