Can you write a random integers function to print integers with in a range?
Answer / hrpatelsoft@gmail.com
function randomInteger(min, max) {
return Math.floor(Math.random() * (max - min + 1) ) + min;
}
randomInteger(1, 100); // returns a random integer from 1 to 100
randomInteger(1, 1000); // returns a random integer from 1 to 1000
| Is This Answer Correct ? | 0 Yes | 0 No |
Name some of the built-in methods and the values returned by them.
How much do javascript programmers make?
just for testing
What are associative arrays in javascript?
Is javascript a dynamic language?
What is enum size?
Which keywords are used to handle exceptions?
Which is faster jquery or javascript?
Can I learn javascript without knowing java?
How do I open a .js file?
What is difference between local variable and global?
What's the date object using javascript?