Lesson 6: Working with Numbers Flashcards
What are some Data Types?
- String
- Boolean true/false
- Null
- Undefined
What are..
- Ox
- Ob
- Oo
Ox = Hexadecimal Ob = Binary Oo = Octal
Show an example of Ox:
let x = oxff;
Show an example of Ob:
let x = ob111;
Show an example of Oo:
let x = oo777;
What does toFixed do?
Returns a string with specified decimal places.
What does the toString method do?
Converts a number into a string with the numerical base of the number.
What are Number Objects used for?
To check and covert a numerical value.
Number.isNaN(o/o):
Returns true.
Number.isNaN(“abc”);
Returns false.
What are the two values of Boolean type?
True or false.
What does Null represent?
A valid but nonexistent value.
What does Undefined indicate?
A variable has been declared but not assigned a value.
What is an integer?
A whole number.
What are Floating-Point numbers?
A number that contains a fractional part.