Basics Flashcards
Get a fucking job
What are static methods?
Methods that belong to a class instead of an instance. They’re called on the class itself. They don’t have access to the this object, which is the instance-specific data. They’re defined with the “static” keyword.
What are instance methods?
Methods that belong to a class instance. They have access to the this object. They don’t need any keyword to be defined.
What is IIFE?
Immediately Invoked Function Expression.
What is a callback?
A function that is passed into another function as an argument, which is then invoked inside the outer function to complete a task or routine.
What is === and == ?
Strict equality and loose equality. Double equals perform type conversion before comparing, triple equals doesn’t.
What are primitives?
A primitive is a data type that is not an object and does not contain methods or properties.
What are the 7 primitives of JavaScript?
- null
- undefined
- number
- bigint
- string
- boolean
- symbol
What’s the difference between Primitive types and Reference types?
Primitive type values get stored directly in the stack (when declared at the top level) and Reference type values are stored in the heap with a reference in the stack.
What is a data type?
It’s a blueprint of how data is represented in the computer’s memory.
Programming languages manipulate values, those values belong to a type. Variables can hold values, a data type defines the kind of value the variable can hold.