<span style= "font-size:18px" >1.math.random (); The result is a random number between 0-1 (including 0, excluding 1) </SPAN>
Math.random (); The result is a random number between 0-1 (including 0, not including 1) [HTML] view Plaincopyprint?
<span style= "font-size:18px" >
2.math.floor (num); Parameter num is a numeric value, and the function result is the integer portion of NUM (returns the largest integer less than or equal to N). </SPAN>
Math.floor (num); Parameter num is a numeric value, and the function result is the integer portion of NUM (returns the largest integer less than or equal to N). [HTML] View Plaincopyprint?
<span style= "font-size:18px" >
3.math.round (num); The parameter num is a numeric value, and the function result is the integer rounded by Num. </SPAN>
Math.Round (num); The parameter num is a numeric value, and the function result is the integer rounded by Num. [HTML] View Plaincopyprint?
<span style= "font-size:18px" >
4.math.ceil (n); Returns the smallest integer greater than or equal to N. </SPAN>
Math.ceil (n); Returns the smallest integer greater than or equal to N. [HTML] View Plaincopyprint?
<span style= "font-size:18px" >
5.math.ceil (Math.random () *10); , the number of random integers from 1 to 10 is mostly obtained, and the probability of taking 0 is minimal. </SPAN>
Math.ceil (Math.random () *10), the main gain is 1 to 10 of the random integer, the probability of taking 0 is very small. [HTML] View Plaincopyprint?
<span style= "font-size:18px" >
6.math.round (Math.random ()); A random integer of 0 to 1 can be obtained evenly. </SPAN>
Math.Round (Math.random ()); a random integer from 0 to 1 can be obtained evenly. [HTML] View Plaincopyprint?
<span style= "font-size:18px" >
7.math.round (Math.random () *10); , a random integer of 0 to 10 can be basically balanced, with half the probability of obtaining a minimum value of 0 and a maximum of 10. </SPAN>
Math.Round (Math.random () *10), the random integer from 0 to 10 is basically balanced, with half the probability of obtaining a minimum value of 0 and a maximum of 10. [HTML] View Plaincopyprint?
<span style= "font-size:18px" >
8.math.floor (Math.random () *10); , a random integer of 0 to 9 can be obtained evenly. </SPAN>