Open 404pnf opened 9 years ago
As you can see from the preceding output, this formula succeeds in generating a set of random numbers between 1 and 10
Math.floor(Math.random() * (this.numElements+1))
Example code will yield 0 if Math.random returns 0.
Example code will yield 0 if Math.random returns 0.