Math methods Flashcards

1
Q

What does the function Maths.abs() do?

A

Returns the absolute value of a number.

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

What does the function Math.ceil() do?

A

Rounds the number up and returns the smaller integer greater than or equal to a given number.

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

What does the function Math.floor() do?

A

Always rounds down and returns the largest integer less than or equal to a given number.

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

What does the function Math.fround() do?

A

Returns the nearest 32-bit single precision float representation of a number.

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

What does the function Math.max() do?

A

Returns the largest of the numbers given as input parameters, or infinity if there are no parameters.

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

What does the function Math.min() do?

A

Returns the smallest of the numbers given as input parameters, or infinity if there are no parameters.

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

What does Math.pow() method do?

A

Returns the value of a base raised to a power.

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

What does Math.random() do?

A

Returns a floating-point, pseudo-random number that’s greater or equal to 0 and less than 1.

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

What does the function Math.round() do?

A

Returns the value or a number rounded to the nearest integer.

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

What does the function Math.sign() do?

A

Returns 1 or -1, if the number is positive it returns 1, if negative it returns -1.

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

What does the function Math.sqrt() do?

A

Returns the square root of a number.

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

What does the function Math.trun() do?

A

Returns the integer part of a number by removing any fractional digits.

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