Linked Questions

2 votes
1 answer
1k views

I'm trying to see myself the different between Promise.all and await Promise.all. I have learnt that the first one ends earlier if one of the promises fail but in the same case with await we have to ...
Johnny Johnny's user avatar
-2 votes
3 answers
3k views

I have the following code try { for (const customer of customers) { followUser(ig, customer.trim()); } } catch (err){ console.log('ERROR: ' + " " + err); } followUser is ...
aherlambang's user avatar
  • 14.4k
4 votes
2 answers
1k views

I currently have this code: const promise1 = aPromiseCall().then(r => logger(r)).catch(e => logger(e)); const promise2 = anotherPromiseCall().then(r => logger(r)).catch(e => logger(e)); ...
Hommer Smith's user avatar
1 vote
1 answer
1k views

I have an array of strings let symbols = ['abc', 'cde', 'edf', 'qqe', 'hrt'] that I pass as an argument to the function: async function fetchDetails(symbols) { let promises = symbols.map((s, i) =&...
Michael Lester's user avatar
2 votes
2 answers
714 views

I am nesting an Axios call in another in order to get the list of IDs from my first call and then loop through and for each ID get the status from a 2nd API call. It will only return the first status ...
Kode's user avatar
  • 3,251
0 votes
1 answer
572 views

I am looking for a way where in i can post multiple HTTP POST requests and just in case there is error on one or more of them then i can know which of those got the error. I tried implementing many ...
mansi's user avatar
  • 1
0 votes
0 answers
719 views

I have the following code in my own async function that uses another imported function from module which is a custom wrap of axios inside try/catch block: async function getCharacter (realmSlug, ...
AlexZeDim's user avatar
  • 4,442
0 votes
2 answers
795 views

I am using API call to get data and update my redux store. Following is state changes for each API call. Before making API call, set isLoading as true On success reset isLoading as false On failure ...
joy's user avatar
  • 3,697
1 vote
1 answer
564 views

I'm new to js and async/await stuff and I want to build distance matrix using yandex maps api and then optimize the route using ACO algorithm. Everything works, but my distance matrix generating so ...
f0xeri's user avatar
  • 13
3 votes
2 answers
136 views

i have one service that get data , and i called it 5 times with different parametes to get different data. I called a function to execute in success case : it work fine. but in case of failure one ...
Joe Sleiman's user avatar
  • 2,506
1 vote
2 answers
221 views

I have the following code await doAllCats(); await doAllDogs(); console.log("Finished processing Cats and Dogs ") function doAllCats() { let promiseArray = []; for(let cat of cats) { ...
pinoyyid's user avatar
  • 22.4k
1 vote
2 answers
119 views

I am trying to make a front-end website using react, and I am using the APIs that NASA has. My main question pertains to the 4 Mars Rovers: Curiosity, Opportunity, Spirit, and Mission Manifest. Each ...
Josee's user avatar
  • 330
0 votes
1 answer
93 views

I am using Firebase Cloud Functions, which get triggered by the creation of a document in Firestore. On creation of the object, I need to undertake two different operations in parallel: update the ...
Aayush Taneja's user avatar
1 vote
2 answers
92 views

I learn React JavaScript and have this Codesandbox where I don't understand why the error is not shown Here in the watchProgress the catch is not fired but it's fired in the promise so I do something ...
Kid's user avatar
  • 2,227
1 vote
5 answers
106 views

So I have this code: for (let i = 0; i < array.length; i++) { let url = array[i]; YTDL.getInfo(url, function(err, info) { if (err) { message.channel.send("There was an ...
AnB's user avatar
  • 129

15 30 50 per page