JavaScript - Data Types Flashcards

1
Q

What are data types in programming?

A

Classifications we give to the different kinds of data used in programming.

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

How many fundamental data types are there in JavaScript?

A

Seven.

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

What is a Number data type?

A

Any number, including decimals: 4, 8, 1516, 23.42.

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

What are the two subgroups of the Number data type?

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

Define Integer in the context of data types.

A

A whole number without a decimal point.

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

Define Float in the context of data types.

A

A number that contains a decimal point.

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

What is a String data type?

A

Any grouping of characters surrounded by single or double quotes.

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

Which type of quotes is preferred for Strings in JavaScript?

A

Single quotes.

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

What is a Boolean data type?

A

A data type that has two possible values: true or false.

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

How can you think of Booleans?

A

As on and off switches or answers to a yes or no question.

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

What does the Null data type represent?

A

The intentional absence of a value.

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

How is Null represented in JavaScript?

A

By the keyword null.

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

What does the Undefined data type indicate?

A

The absence of a value, but it has a different use than null.

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

How is Undefined represented in JavaScript?

A

By the keyword undefined.

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

What is a Symbol in JavaScript?

A

A unique identifier, useful in more complex coding.

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

What is an Object data type?

A

Collections of related data.

17
Q

Which of the first six data types are considered primitive data types?

A

Number, String, Boolean, Null, Undefined, Symbol.

18
Q

What distinguishes Objects from primitive data types?

A

Objects are more complex.