Data Types Flashcards
What are data types?
A value in JavaScript is always of a certain type. For example, a string or a number.
What are the 7 primitive data types?
Number.
String.
Boolean.
Undefined.
Null.
Symbol.
BigInt.
What is a non-primitive data type?
Object.
(an array is not a special data type in JavaScript, it belongs to the object data types)
What is a Number data type?
The number type represents both integer and floating point numbers.
What is a String data type?
A string (or a text string) is a series of characters like “John Doe”.
What is a Boolean data type?
The boolean type has only two values: true and false.
What is an Undefined data type?
In JavaScript, a variable without a value, has the value undefined. The type is also undefined.
What is a Null data type?
It’s a special value which represents “nothing”, “empty” or “value unknown”.
What is a Symbol data type?
Symbols are unique identifiers used within objects.
What is a BigInt data type?
BigInt is a datatype that can be used to store integer values that are too big to be represented by a normal JavaScript Number.
What is an Array?
An array is a special variable, which can hold more than one value:
What is an Object?
Objects are used to store keyed collections of various data.