Practice Sheet_ Asynchronous Callbacks and Promises
Practice Sheet_ Asynchronous Callbacks and Promises
Description: Write a program that reads a file using asynchronous callbacks and logs its
content. Goal: Understand how to use callbacks for asynchronous operations. Tasks:
Description: Fetch data from two APIs sequentially using callbacks. Goal: Understand callback
chaining. Tasks:
Description: Refactor a function that uses callbacks into a function that uses Promises. Goal:
Learn how to create and use Promises. Tasks:
Description: Fetch data from three APIs concurrently and log their results. Goal: Understand
Promise.all. Tasks:
Description: Execute two asynchronous tasks sequentially using Promises. Goal: Practice
chaining .then(). Tasks:
Description: Simulate a failing API call and handle errors. Goal: Learn error handling with
.catch(). Tasks:
Description: Create a Promise that resolves after a delay. Goal: Learn to use setTimeout
with Promises. Tasks:
Description: Simulate a scenario with nested Promises. Goal: Understand how to manage
nested asynchronous flows. Tasks:
Description: Convert a Node.js callback function to return a Promise. Goal: Practice manual
Promisification. Tasks: