3.1.1.8 Random number generation in programming. Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Define the syntax for the random number method.

A

Math.random( );

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define the syntax for generating a random number between two values.

A

Math.floor( (Math.random( ) * 10 ) + 1 );

How well did you know this?
1
Not at all
2
3
4
5
Perfectly