JS MATH OBJECT (Properties and Methods for numbers) Flashcards

1
Q

PI Property

A

Math.PI. displays the mathematical constant pi in the console.

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

Round Method

A

Math.round(argument);

Rounds the number to the nearest Integer (AKA NOT a decimal))

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

Floor Method

A

Math.floor(argument);

Rounds the number down
Removes the numbers after the decimal on a positive number

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

Ceil Method

A

Math.ceil(argument);

```
Rounds the number up to the nearest whole number
// Removes the numbers after the decimal on a negative number
~~~

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

Random Method

A
Math.random();
(Returns a number from 0 up to less than 1)
// NOTE: The Random Method does not accept an argument (Nothing inside of the parenthesis "()")
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Min Method

A
Math.min (argument);
// Min Method (Returns the lowest number)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Max Method

A

Math.max(argument);

Returns the highest number

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