E
E
Eugene2019-04-17 00:22:08
JavaScript
Eugene, 2019-04-17 00:22:08

How to implement synchronous recursive function call?

I have code written using async await. In one section, you need to perform a recursive function call. In this case, the code should not be executed further until the condition for exiting the recursion is met.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-04-17
@Robur

async foo() {
 // тут всякое
  await foo()
 //тут всякое другое
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question