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 |
Explain equality operators in javascript?
How to create a popup warning box?
how can we retrieve value from one database server and store them another database server using sql server code
What are javascript closures?when would you use them?
How about 3+5+"8"?
What is the use of Void(0)?
Is there automatic type conversion in JavaScript?
How do I start a javascript project?
Explain why asynchronous code is important in javascript?
What are the main uses of javascript?
Why is var better than let?
write a program using javascript/ vbscript that checks if two matrices have identical values in all the elements.