Library Functions Flashcards
1
Q
Show how to specify a binary literal.
A
let a = 0b00001111;
2
Q
Show and example of octal notation.
A
let a = 017;
3
Q
Show how to test that a number is an Integer.
A
console.log(Number.isInteger(a));
true or false
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”.
5
Q
What function determines finite values
A
Number.isFinite();
6
Q
What is Number.isSafeInteger?
A
All JavaScript numbers are float. IsSafeInteger values can fit in 64 bits without rounding.
7
Q
What is the value that is considered the reasonable rounding error?
A
Number.EPSILON