Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 1.73 KB

File metadata and controls

77 lines (59 loc) · 1.73 KB

JavaScript Assignments

This folder contains assignments focused on asynchronous JavaScript.

Assignment Categories

You can follow the recommended order below or complete them in any sequence you prefer.

1. Easy

  • Counter
  • Counter (without setInterval)
  • Read from a file
  • Write to a file

2. Medium

  • File Cleaner
  • Clock

3. Hard

  • Promisify setTimeout
  • Sleep Completely
  • Promise all
  • Promise Chain

Development Setup

Option 1: Run Locally (Requires Node.js)

  1. Ensure you have Node.js installed.
  2. Clone or download this repository.
  3. Navigate to the respective assignment folder and execute the script using Node.js.

Option 2: Run on Replit (No Local Setup Required)

  1. Copy the assignment code to Replit.
  2. Execute the script in Replit's environment.

Running Tests

For Hard-Level Assignments

  1. Navigate to /Javascript-Assignments/01-async-js.
  2. Install dependencies using:
    npm install
  3. Run specific tests with:
    npm run <test-name>
    Example:
    npm run 1-promisify-setTimeout
  4. To execute all tests at once, run:
    npm run all

For Easy & Medium Assignments

  • There are no automated tests.
  • Manually run scripts using Node.js:
    node easy/1-counter.js
    (Replace 1-counter.js with the relevant file name.)
  • Follow the same approach for medium problems.

Demo Video

For a walkthrough on navigating through the assignments, check out this demo video:

01-async-js.mov

PS: If you're stuck on a problem for more than an hour, feel free to check the solution folder.