see http://jsfiddle.net/JPxXp/
I understand as to why I keep getting 1 as the minimum ball number; do I create another variable / array that holds the 6 randomised numbers (if so, how – I don’t fully understand how to do this).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, define an array that holds the randomised numbers:
Each time you generate a random number, add it to that array:
The min checker would iterate the new array with random numbers like this:
In case you didn’t know, you can also use:
http://jsfiddle.net/pimvdb/JPxXp/7/