A comprehensive collection of JavaScript concepts, algorithms, and projects ranging from vanilla JS to backend logic. This repository includes examples of ES6+ syntax, DOM manipulation, data structures, and optimized algorithms.
The codebase is organized into five primary modules. Each module is contained in its own folder with dedicated HTML and JS files:
- 01.Basics/ - Core concepts including variables, data types, type conversion, and operators.
- 02.Control Flows/ - Logic flow control using conditionals, loops, switch statements, and basic error handling.
- 03.Intermediate/ - Modern ES6+ features, including arrow functions, destructuring, template literals, and the spread/rest operators.
- 04.Advance/ - High-order array methods (map, filter, reduce), advanced data structures (Map, Set), and symbols.
- 05.Dom/ - Document Object Model (DOM) manipulation, event listeners, and dynamic UI updates.
To run these files, you need one of the following:
- A modern web browser (Chrome, Firefox, Edge, or Safari).
- Node.js installed on your machine (optional, for terminal execution).
There are two ways to execute the scripts in this repository.
This method allows you to see the output immediately without installing software.
- Download the repository to your local machine.
- Navigate to the folder of the module you want to study (e.g.,
01.Basicsor05.Dom). - Open the
app.htmlfile inside that folder in any web browser. - Once the page loads, Right-Click anywhere on the page and select Inspect.
- Navigate to the Console tab in the developer tools panel.
- The output of the JavaScript file (
app.js) will be displayed there.
If you prefer working in a command-line environment:
- Open your terminal or command prompt.
- Navigate to the root directory of the repository.
- Run the specific file using the node command. For example:
Note: Use quotes around the path if the folder name contains spaces (e.g., "02.Control Flows/app.js").
node "01.Basics/app.js"
- Console Logs: Most files use
console.log()to print values. Ensure your browser console filter is set to "All levels" or "Info". - Strict Mode: All code is written assuming modern strict standards. Global variable leaks are prevented using
constandlet.
- Naming Conventions: Variables use
camelCase. Constants useUPPER_SNAKE_CASE. - Type Safety: While this is vanilla JavaScript, the logic follows strong typing principles (e.g., using
===instead of==) to minimize bugs.
For further reading and official documentation on the concepts used in this repository, refer to the following:
- MDN Web Docs (Mozilla): The industry standard for JavaScript documentation.
- W3Schools JavaScript Tutorial: A useful resource for quick syntax references and examples.
- The Modern JavaScript Tutorial: A detailed guide covering everything from basics to advanced topics.
This repository is actively maintained. The following modules are currently in development and will be updated soon:
- 06_Async_Concepts: Understanding Promises, Async/Await, and the Event Loop.