Skip to content
Advertisement

Tag: promise

Returning result from asynchronous function using callbacks

I have to write the body of a function getABC() which essentially has to take in responses from 3 different functions, getA()(synchronous),getB(callback)(callback driven),getC() (promise based). Ultimately I have to return a promise aggregating each function’s result, like [(result of getA),(result of getB),(result of getC)]. I am pasting the snippet of the code down below: ` I cannot edit any other

Replace fetch link with html button

This code is designed to take a data from API, convert it to JSON and display it in the HTML page (with a specific design). There are two buttons on the HTML page that are for changing the page (to change the page, the URL sent to fetch needs to be changed by clicking the buttons (which is where my

Order of Async function calls

I’m making a React App for my Football team to keep track of Payments and Debts for each Member. I’m trying to search the database for Records for each Season and delete a Member if no records are found. Currently the Member gets deleted then the database searched. This is the code block (it can also be seen with the

Advertisement