Library Functions Flashcards

1
Q

Show how to specify a binary literal.

A

let a = 0b00001111;

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

Show and example of octal notation.

A

let a = 017;

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

Show how to test that a number is an Integer.

A

console.log(Number.isInteger(a));

true or false

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

What’s the difference between isNaN(value) and

Number.isNaN(value)?

A

isNaN returns true whenever it’s argument is not a number.

Number.isNaN on the other hand only returns true if the value of its argument is literally “NaN”.

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

What function determines finite values

A

Number.isFinite();

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

What is Number.isSafeInteger?

A

All JavaScript numbers are float. IsSafeInteger values can fit in 64 bits without rounding.

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

What is the value that is considered the reasonable rounding error?

A

Number.EPSILON

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