Is there something I can use instead of all those setTimeouts from Javascript line 76 and below? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

Is there something I can use instead of all those setTimeouts from Javascript line 76 and below?

https://code.sololearn.com/WEMz4oBs2581/?ref=app

12th Oct 2019, 5:11 PM
šŸ‡ Alex Tușinean šŸ’œ
šŸ‡ Alex Tușinean šŸ’œ - avatar
3 Respostas
+ 1
The way you did is called callback hell, it's a bad coding practice, use Promise or async/await to get rid of callback hell.
13th Oct 2019, 8:14 AM
CalviÕ²
CalviÕ² - avatar
13th Oct 2019, 9:35 AM
CalviÕ²
CalviÕ² - avatar
+ 1
Better way is to use async/await method https://code.sololearn.com/WWbf38rSVv37/?ref=app
13th Oct 2019, 9:36 AM
CalviÕ²
CalviÕ² - avatar