JavaScript Concepts - Up to Asynchronous JS
1. JavaScript Fundamentals
1.1 Variables
Variables store data values.
Types:
- var: Function-scoped, can be re-declared & updated, hoisted.
- let: Block-scoped, can't be re-declared in the same scope.
- const: Block-scoped, cannot be re-assigned or re-declared.
1.2 Data Types
Primitive Types: String, Number, Boolean, Null, Undefined, Symbol, BigInt
Non-Primitive Types: Object, Array, Function
1.3 Type Coercion vs Type Conversion
- Type Conversion: Manually converting types.
- Type Coercion: Implicit conversion by JavaScript.
1.4 Operators
Arithmetic, Assignment, Comparison, Logical, Bitwise
1.5 Control Structures
Conditional: if, else, switch
Loops: for, while, do...while, for...in, for...of
1.6 Functions
Function Declaration, Expression, Arrow Functions
1.7 Scope
Global, Function, and Block Scope
1.8 Hoisting
Variables and functions are hoisted to the top of their scope.
1.9 Closures
Inner functions have access to outer function variables.
1.10 IIFE
Immediately Invoked Function Expression runs on definition.
1.11 Template Literals
Allows embedded expressions using backticks.
1.12 Event Bubbling and Capturing
Event propagation phases: bubbling and capturing.
2. Intermediate JavaScript
2.1 Array Methods
map, filter, reduce, forEach, find, sort, slice, splice
2.2 Destructuring
JavaScript Concepts - Up to Asynchronous JS
Unpack arrays or objects.
2.3 Spread and Rest
Spread expands, Rest gathers.
2.4 Optional Chaining and Nullish Coalescing
Safe property access and default values.
2.5 Set and Map
Set stores unique values. Map stores key-value pairs.
2.6 JSON
stringify and parse for data interchange.
3. Asynchronous JavaScript
3.1 Callbacks
Functions passed to other functions for execution.
3.2 Promises
Handle async operations with resolve and reject.
3.3 async / await
Simplifies working with Promises.
3.4 Event Loop
Handles async code with call stack, web APIs, queues.
3.5 setTimeout & setInterval
Run functions after delay or at intervals.
3.6 Debouncing vs Throttling
Debounce delays execution, Throttle limits rate.