JavaScript Flashcards

1
Q

What is a first-class function?

A

A function that is treated like a value.

Examples:
Assign a function to a variable.
Pass a function as an argument.
Return a function.

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

What is a variable?

A

A named reference to a value.

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

What are primitives?

A

Data that is not an object and has no methods.

6 data types: string, number, bigint, boolean, undefined, symbol

Primitives are immutable

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

What is null?

A

A special primitive object that represents a nonexistent object.

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