JavaScript Data Types Flashcards
Learn about data types in JavaScript
How many data types are used in JavaScript and what are they?
There are 8 data types used in JavaScript, they are:
- Boolean,
- Null,
- Undefined,
- Number,
- Bigint,
- String,
- Symbol,
- Object
What is boolean?
Boolean is a data type that can only contain true or false.
What is null?
A null value represents a reference that points, generally intentionally, to a non-existent or invalid object or address.
What is undefined?
Undefined is a data type that that is automatically assigned to variables that have just been declared, or to formal arguments for which there are no arguments.
What is a number?
A number is an integer or a floating point number.
What is a BigInt?
A BigInt is an integer with arbitrary precision.
What is a string?
A string is a sequence of characters that represent a text value.
What is a symbol?
A symbol is a data type whose instances are unique and immutable.
What is an object?
An object is a collection of properties.