Number Methods Flashcards
1
Q
pow(x,y)
A
Returns the value of x to the power of y
2
Q
random()
A
Returns a random number between 0 (inclusive) and 1 (exclusive)
3
Q
round(x)
A
Rounds x to the nearest integer
4
Q
sin(x)
A
Returns the sine of x
5
Q
sqrt(x)
A
Returns the square root of x
6
Q
tan(x)
A
Returns the tangent of x
7
Q
toExponential(x)
A
Converts a number into an exponential notation
8
Q
toFixed(x)
A
Formats a number with x numbers of digits after the decimal point
9
Q
toPrecision(x)
A
Formats a number to x length
10
Q
toString()
A
Converts a Number object to a string
11
Q
valueOf()
A
Returns the primitive value of a Number object