An interactive, comprehensive reference for JavaScript and TypeScript developers. This repository contains examples, best practices, and code snippets for all major concepts.
- 01. Basics - Variables, Data Types, Operators
- 02. Functions - Functions, Arrow Functions, IIFE, Closures
- 03. Scope & Context - Scope, Context,
thiskeyword
- 04. Array Methods - Map, Filter, Reduce, Sort, Find, Every, Some
- 05. Advanced Array Operations - Complex Sorting, Filtering, Statistics
- 06. Data Analysis - Mean, Median, Mode, Variance, Standard Deviation, Percentile
- 07. Grouping & Aggregation - GroupBy, CountBy, SumBy, Aggregate Functions
- 08. Set Operations - Intersection, Union, Difference, Symmetric Difference
- 09. Object Fundamentals - Creating, Accessing, Methods
- 10. Object Manipulation - Object.keys, Object.values, Object.entries, Destructuring
- 11. Object Patterns - Prototypes, Getters, Setters, Property Descriptors
- 12. JSON Basics - Parse, Stringify, Deep Clone
- 13. JSON Advanced - Schema Validation, CSV Conversion, XML Conversion
- 14. JSON Best Practices - Error Handling, Date Handling, Custom Serialization
- 07. Callbacks & Promises - Callbacks, Promises, Chaining
- 08. Async/Await - Modern Async Patterns
- 09. Event Loop - Understanding JavaScript Runtime
- 10. DOM Manipulation - Selectors, Events, Manipulation, Window API
- 11. Fetch API - HTTP Methods, Request/Response, Timeouts, Retry Logic
- 12. Debugging - Console Methods, Breakpoints, DevTools, Performance Profiling
- 15. Data Structures - Stack, Queue, LinkedList, Tree, Graph
- 16. Sorting Algorithms - Bubble, Quick, Merge Sort
- 17. Search Algorithms - Binary Search, BFS, DFS
- 18. LeetCode-Style Problems - Array Problems, String Manipulation
- 19. Algorithm Challenges - Two Pointers, Sliding Window, Dynamic Programming
- 20. Problem-Solving Patterns - Common Patterns, Solutions, Time Complexity
- 21. TypeScript Basics - Types, Interfaces, Type Aliases
- 22. Advanced Types - Generics, Utility Types, Decorators
- 23. TypeScript Config - tsconfig.json, Compiler Options
- 24. React Basics - Components, Hooks, memo, forwardRef, lazy, Suspense, Portals, Advanced APIs
- 25. React with TypeScript - Typing Components, Props, Hooks, Events
- 26. React Server Components - RSC, Server Actions, Streaming
- 27. Node.js - Node.js Basics, Modules, File System
- 28. Express - REST APIs, Middleware, Auth, Validation, Pagination, File Upload, Swagger
- 29. Databases - SQL, MongoDB, ORMs (Sequelize, Mongoose)
- 30. Security - XSS, CSRF, Authentication, JWT
- 31. Error Handling - Try/Catch, Error Boundaries
- 32. Best Practices - Clean Code, Patterns
- 33. Testing - Jest, Mocha, Testing Library
- 34. Debugging - Chrome DevTools, VSCode Debugger
- 35. Performance - Profiling, Optimization
- 36. Package Managers - npm, yarn, pnpm
- 37. Build Tools - Webpack, Vite, Rollup
- 38. Popular Libraries - Lodash, Axios, Moment, etc.
- 39. Math Operations - Math Object, Calculations, Formatting
- 40. Date & Time - Date Object, Moment.js, Day.js
- 41. Modules - ES6 Modules, CommonJS, Dynamic Imports
- 42. Classes & OOP - Classes, Inheritance, Polymorphism
- 43. Functional Programming - Pure Functions, Immutability
- 44. Web Applications - SPA, PWA, SSR
- 45. Desktop Applications - Electron, Tauri
Each section includes:
- β Complete code examples
- β Runnable snippets
- β Real-world use cases
- β Common pitfalls & solutions
- β Best practices
# Clone the repository git clone <repository-url> # Navigate to examples cd Snippets # Install dependencies (for running examples) npm install # Run interactive examples npm run examples- Navigate to the topic you need
- Read the explanations and examples
- Copy code snippets into your project
- Experiment with the interactive examples
Contributions are welcome! Feel free to submit pull requests or open issues.
MIT License - Feel free to use this cheatsheet for learning and reference.
Made with β€οΈ for JavaScript & TypeScript developers