1. Call Stack
2. Primitive Types
3. Value Types and Reference Types
4. Type Coercion
5. == vs === vs typeof
== (loose equality) and
=== (strict equality). It’s essential to grasp the difference between them. Additionally, the
typeof operator helps determine the data type of a value, which is valuable when working with dynamic data.
6. Scope: Function, Block, and Lexical
const), and lexical scope. Function scope means variables declared within a function are only accessible within that function. Block scope, introduced with ES6, allows variables to be scoped within blocks (e.g., if statements or loops). Lexical scope refers to how nested functions can access variables from their containing scope.
7. Expression vs Statement
8. IIFE, Modules, and Namespaces
Immediately Invoked Function Expressions (IIFE) are self-executing functions often used to encapsulate code. ES6 introduced modules, allowing you to organize your code into reusable and maintainable pieces. Namespaces are a way to avoid naming conflicts in large codebases.
9. Message Queue and Event Loop
10. setTimeout, setInterval, and requestAnimationFrame
These timing functions are crucial for controlling when and how specific code executes.
setTimeout executes a function after a specified delay,
setInterval repeatedly executes a function at intervals, and
requestAnimationFrame is used for smooth animations.