Data Types Flashcards

1
Q

What are data types?

A

A value in JavaScript is always of a certain type. For example, a string or a number.

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

What are the 7 primitive data types?

A

Number.
String.
Boolean.
Undefined.
Null.
Symbol.
BigInt.

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

What is a non-primitive data type?

A

Object.
(an array is not a special data type in JavaScript, it belongs to the object data types)

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

What is a Number data type?

A

The number type represents both integer and floating point numbers.

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

What is a String data type?

A

A string (or a text string) is a series of characters like “John Doe”.

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

What is a Boolean data type?

A

The boolean type has only two values: true and false.

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

What is an Undefined data type?

A

In JavaScript, a variable without a value, has the value undefined. The type is also undefined.

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

What is a Null data type?

A

It’s a special value which represents “nothing”, “empty” or “value unknown”.

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

What is a Symbol data type?

A

Symbols are unique identifiers used within objects.

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

What is a BigInt data type?

A

BigInt is a datatype that can be used to store integer values that are too big to be represented by a normal JavaScript Number.

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

What is an Array?

A

An array is a special variable, which can hold more than one value:

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

What is an Object?

A

Objects are used to store keyed collections of various data.

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