This repository contains a series of JavaScript exercises covering fundamental concepts such as:
- Variables and Functions
- Arrays and Objects
- map(), filter(), reduce()
- async/await and Promises
Each folder contains individual exercises with commented code.
Small exercises demonstrating variables, functions (regular & arrow), template strings, input validation, and simple operations.
Exercises covering creation, manipulation and iteration of arrays in JavaScript.
Exercises covering object creation, property manipulation, and object methods in JavaScript.
Exercises covering the use of forEach, map, filter, and reduce in JavaScript. Each block demonstrates data transformation patterns relevant for QA automation (e.g., parsing API responses and computing summaries).
- forEach: iteration without return
- map: transformation, returns new array
- filter: conditional selection
- reduce: aggregation
This module focuses on mastering asynchronous programming in JavaScript — a fundamental skill for QA and Automation Engineers.
It demonstrates how to manage asynchronous flows using Promises, async/await, and concurrency tools such as Promise.all() and Promise.race().
- Understand the asynchronous nature of JavaScript.
- Create and handle Promises for managing async logic.
- Write cleaner asynchronous code using async/await.
- Implement proper error handling using
.catch()andtry...catch. - Execute multiple asynchronous operations in parallel using
Promise.all()andPromise.race(). - Apply these concepts to real-world QA workflows (API calls, test pipelines, data fetching).
This module covers how to interact with external APIs, handle HTTP responses, parse JSON data, and transform it for QA testing workflows.
It builds upon asynchronous programming concepts and focuses on practical use cases for data validation and automation testing.
- Perform GET and POST requests using the
fetch()API. - Parse and transform JSON responses using
map(),filter(), andreduce(). - Handle HTTP and network errors with
try...catchand conditional checks (response.ok). - Run multiple API requests concurrently using
Promise.all()andPromise.allSettled(). - Integrate data processing patterns relevant for QA automation (e.g., validating API data consistency or computing test statistics).
-
Basic Fetch Request
Fetch user data from an API and log key fields (name, email, city). -
Filtering and Transformation
Apply array methods to transform and filter JSON data (e.g., uppercase names, location-based filters). -
POST Request Simulation
Send data to an API endpoint using POST with custom headers and log server responses. -
Error Handling
Distinguish between HTTP and network errors, implementing clear error messages and fallbacks. -
Parallel API Calls
Fetch multiple endpoints simultaneously usingPromise.all()andPromise.allSettled(), then merge the results for analysis.
This final assessment consolidates all the concepts learned throughout the JavaScript Foundations block, combining logic, asynchronous programming, and data manipulation into real QA-style exercises.
To demonstrate the ability to:
- Use core JavaScript syntax and control structures.
- Handle asynchronous operations with
fetch(), Promises, andasync/await. - Manipulate and transform data using array methods (
map,filter,reduce). - Manage errors gracefully.
- Build small, test-focused utilities — similar to those used in automation workflows.
- Task A – Test Data Cleaner
- Task B – QA Report Generator
- Task C – Test Result Aggregator (Bonus)
Go inside the folder you want to run. Open the terminal and type the following command: node file-name.js