|
|
Q1264 How to generate a random integer within and including two limits. For example: 3 & 7. How to randomly generate 3, 4, 5, 6 or 7?
irt.org | Knowledge Base | JavaScript | Random | Q1264 [ previous next ] Q1264 How to generate a random integer within and including two limits. For example: 3 & 7. How to randomly generate 3, 4, 5, 6 or 7?There are three useful methods: METHOD#1. Hardcode the numbers into the function...
METHOD#2. Pass the numbers to the function...
METHOD#3. Pass the variables to the function...
Submitted by Joe Barta |
-- div -->
|