Welcome to the JavaScript Concepts Repository — a well-structured collection of files and folders designed to help you learn, practice, and master key JavaScript topics through hands-on examples.
Each folder below focuses on a specific JavaScript concept or feature.
Learn the most common and powerful array methods in JavaScript.
Files:
main.js– Demonstrates methods such as:map(),filter(),reduce(),forEach(),find(),every(),some(),sort(), andincludes().
Key Concepts:
- Array iteration and transformation
- Functional programming using arrays
Understand how JavaScript handles asynchronous operations.
Files:
callbacks.js– Basics of callback functions and asynchronous execution.promises.js– Creating and chaining Promises.asyncAwait.js– Usingasync/awaitsyntax.fetchAPI.js– Fetching data from APIs usingfetch().timing-methods.js– UsingsetTimeoutandsetInterval.README.md– Notes and explanations.
Key Concepts:
- Event loop and concurrency
- Promise-based workflows
- Asynchronous patterns and timing control
Learn how to work with JavaScript’s Date object.
Files:
main.js– Examples of:- Creating dates, formatting, getting day/month/year, and working with timestamps.
Key Concepts:
- Date manipulation and formatting
- Calculating time differences
Explore how JavaScript interacts with the Document Object Model (DOM).
Files:
index.html– Example HTML file for testing.main.js– Selecting, creating, and modifying HTML elements.
Key Concepts:
- DOM selection methods (
getElementById,querySelector, etc.) - Event handling
- Dynamic content manipulation
Understand how to properly handle and throw errors.
Files:
throwError.js– How to create and throw custom errors.tryCatch.js– Usingtry,catch, andfinally.
Key Concepts:
- Exception handling
- Custom error creation
- Defensive programming
Dive into modern JavaScript (ES6+) syntax and functionalities.
Files:
arrowFunctions.js– Shorter syntax for writing functions.destructuring.js– Unpacking arrays and objects.restOperator.js– Collecting remaining arguments.spreadOperator.js– Spreading array/object values.templateLiterals.js– Dynamic string interpolation.
Key Concepts:
- Cleaner, modern syntax
- Code readability improvements
- Working with complex data structures
Work with JSON (JavaScript Object Notation) data formats.
Files:
parse.js– Convert JSON strings into JavaScript objects.stringify.js– Convert JavaScript objects into JSON strings.
Key Concepts:
- Data serialization and deserialization
- Storing and transmitting structured data
Learn useful mathematical functions in JavaScript.
Files:
main.js– Examples using:Math.round(),Math.ceil(),Math.floor(),Math.random(),Math.max(),Math.min(), and more.
Key Concepts:
- Random number generation
- Basic arithmetic operations
- Rounding and precision control
Master how to handle and manipulate JavaScript objects.
Files:
main.js– Examples of:- Object creation, copying, merging, freezing, keys/values iteration, and destructuring.
Key Concepts:
- Object manipulation
- Deep vs shallow copy
- Object immutability
Explore powerful string handling in JavaScript.
Files:
main.js– Demonstrates:toUpperCase(),toLowerCase(),slice(),substring(),replace(),includes(),split(),trim(), etc.
Key Concepts:
- String formatting and searching
- Substring extraction
- Character manipulation
- JavaScript Core Fundamentals
- Modern ES6+ Syntax
- DOM Manipulation
- Error and Exception Handling
- Asynchronous Programming (Callbacks, Promises, Async/Await)
- JSON Parsing and API Integration
- String, Array, and Object Utilities
- Mathematical and Date Operations
- Clone the repository
git clone https://github.com/codeby-david/javascript-concepts.git