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 |
What e means?
Give an example of closure?
How many functions are there in javascript?
Difference between '=', '==' and '===' operators?
What are escape characters in javascript?
Which parameter of load ()' s callback function has the data?
Why javascript is fast?
What is difference between javascript and jscript?
What is difference between ajax and javascript?
What is argument objects in javascript?
Write a program in Java to display the IP address of the local and remote machine.
0 Answers Annamalai University,
What is the difference between JavaScript and jscript?