promise tag

8 questions


1 answers
55 views
0
I want to return the array with Promise.

Thank you for your help.Please tell me how to handle Promise return values.■What you want to doI want to get the value of the array that Promise processed.■ ProgramAccess the path of the image written...

2 years ago

1 answers
101 views
0
I want to convert the Promise array into an async generator that will resolve it in the earliest order.

Now, when there is an array of Promise, I would like to wait in the order of the resolve. ES2021 introduced the syntax for wait of, so if you have a function such as a library that converts Promise ar...


2 answers
121 views
0
How to Smartly Store the Final Results of Promise in a Variable in javascript

aPromise.then(function taskA(value){ // task A ~ some kind of action ~}).then(function taskB(value){ // task B // The value of taskB is the final result. // I want to store the value of taskB for this...

2 years ago

2 answers
81 views
0
Is it possible to rewrite the following Promise code with async/await?

Thank you for your help.As stated in the title, is it possible to rewrite the code shown below to do the same with async/await?function hello(){ return new Promise ((resolve, reject) = > { setTime...

2 years ago

1 answers
143 views
0
How to Test Promise Recursive Processing in JEST

I don't know how to test Promise recursive processing in JEST.I am writing a test using JEST.In this test, the retry function that recurs until Promise is resolved is tested.export function retry<T...


2 answers
102 views
0
[javascript] Question when importing a response object with a prompt

Hello. The code below is the code that you want to get the data of a specific link to JS.Through this code, I first learned about fetch functions, promise objects, and response objects. const endpoint...


1 answers
56 views
0
This is a question related to JavaScript promise.

var temp = function(){ return new Promise( (resolve, reject)=>{ setTimeout( ()=>{console.log(1)} ,1000) } )}temp().then( ()=>{ console.log(2) })I'm practicing my promise. Wait 1 secon...

2 years ago

1 answers
92 views
0
This is a question related to JavaScript promise.

function delay(a) { setTimeout(() => { console.log(a); }, 1000);}function prompt(a) { console.log(a);}var temp = function() { return new Promise((resolve) => { delay('first'); resolve(); });}...

2 years ago

© 2024 OneMinuteCode. All rights reserved.