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.
2
Q
What is a variable?
A
A named reference to a value.
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
4
Q
What is null?
A
A special primitive object that represents a nonexistent object.